GithubHelp home page GithubHelp logo

bradfa / flashbench Goto Github PK

View Code? Open in Web Editor NEW
190.0 190.0 34.0 68 KB

Testing tool for managed flash memory devices, see the 'dev' branch for updates which aren't yet "upstream" and report your results to the flashbench-results mailing list ->

Home Page: http://lists.linaro.org/mailman/listinfo/flashbench-results

License: GNU General Public License v2.0

C 99.16% Makefile 0.84%

flashbench's People

Contributors

arndb avatar bradfa avatar icjl avatar jdenhartog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flashbench's Issues

Automate basic tests

If running the -a, open-au, and find-fat tests could be automated, that would be very helpful for getting new users over the hump of using flashbench and reporting results.

For example, the flow would be:

  1. Run -a test, if erase block size is easy to see, output it and continue.
  2. Run open-au tests, without random, to find open-au. Probably need to have the user specify a max number of open-au if they want to test cards with possibly big open-au (Samsung 32 GB essentials, etc). If open-au, non-random, is successful in finding a likely value, continue.
  3. Run random open-au tests. Similar caveats to 2.
  4. Run find-fat tests. Maybe do this even if open-au tests fail, so long as we have a likely erase block size from 1?

Android binary

I'm having trouble building this arm native. I'm not very good at this so I may have made a mistake, is it possible?

NDK_ROOT=~/projects/android-crosscompile/android-ndk-r9
export PATH="$NDK_ROOT/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/:$PATH"
export SYS_ROOT="$NDK_ROOT/platforms/android-14/arch-arm/"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
export LD="arm-linux-androideabi-ld"
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"
export LDFLAGS=--sysroot=$SYS_ROOT
export CFLAGS=--sysroot=$SYS_ROOT

flashbench $ make clean; make;
rm flashbench flashbench.o dev.o vm.o
rm: cannot remove ‘flashbench’: No such file or directory
rm: cannot remove ‘dev.o’: No such file or directory
rm: cannot remove ‘vm.o’: No such file or directory
make: *** [clean] Error 1
arm-linux-androideabi-gcc --sysroot=/home/weedy/projects/android-crosscompile/android-ndk-r9/platforms/android-14/arch-arm/ -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2   -c -o flashbench.o flashbench.c
arm-linux-androideabi-gcc --sysroot=/home/weedy/projects/android-crosscompile/android-ndk-r9/platforms/android-14/arch-arm/ -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2   -c -o dev.o dev.c
dev.c: In function 'time_erase':
dev.c:98:23: error: 'BLKDISCARD' undeclared (first use in this function)
dev.c:98:23: note: each undeclared identifier is reported only once for each function it appears in
dev.c: In function 'setup_dev':
dev.c:137:2: warning: implicit declaration of function 'posix_memalign' [-Wimplicit-function-declaration]
make: *** [dev.o] Error 1

doesn't seem to produce usable output for modern NVME SSD, like Intel 600p series 256GB

./flashbench -a /dev/nvme0n1 --blocksize 1024
align 68719476736 pre 47.5µs on 48µs post 47.5µs diff 487ns
align 34359738368 pre 47.4µs on 48µs post 47.5µs diff 551ns
align 17179869184 pre 47.4µs on 48µs post 47.5µs diff 509ns
align 8589934592 pre 47.5µs on 48µs post 47.6µs diff 502ns
align 4294967296 pre 47.5µs on 48µs post 47.6µs diff 441ns
align 2147483648 pre 57.3µs on 56.9µs post 55.5µs diff 457ns
align 1073741824 pre 55.5µs on 57.4µs post 56.3µs diff 1.52µs
align 536870912 pre 55.7µs on 57.4µs post 56.1µs diff 1.5µs
align 268435456 pre 47.5µs on 48µs post 47.5µs diff 491ns
align 134217728 pre 47.5µs on 48µs post 47.5µs diff 532ns
align 67108864 pre 47.5µs on 48µs post 47.6µs diff 483ns
align 33554432 pre 47.5µs on 48µs post 47.5µs diff 557ns
align 16777216 pre 47.5µs on 48µs post 47.5µs diff 504ns
align 8388608 pre 55.5µs on 57.4µs post 56µs diff 1.63µs
align 4194304 pre 55.5µs on 57.5µs post 56.1µs diff 1.68µs
align 2097152 pre 57.1µs on 58.5µs post 57.3µs diff 1.29µs
align 1048576 pre 47.6µs on 57.4µs post 57.4µs diff 4.95µs
align 524288 pre 47.5µs on 48µs post 47.4µs diff 501ns
align 262144 pre 47.5µs on 48µs post 47.4µs diff 572ns
align 131072 pre 47.5µs on 47.9µs post 47.4µs diff 461ns
align 65536 pre 47.5µs on 47.9µs post 47.5µs diff 477ns
align 32768 pre 47.5µs on 48µs post 47.5µs diff 535ns
align 16384 pre 47.7µs on 49µs post 47.6µs diff 1.36µs
align 8192 pre 55.8µs on 57.4µs post 56.3µs diff 1.33µs
align 4096 pre 55.8µs on 57.4µs post 56.3µs diff 1.34µs
align 2048 pre 55.8µs on 56.2µs post 56.2µs diff 218ns 

Intel product code: SSDPEKKW256G7X1
EAN: 5032037087766
UPC: 735858318259

inform user when not running as root

I tried to run flashbench 62 (for Ubuntu repos) as user, only for it to fail with a cryptic error message:

geek@liv-inspiron:~$ flashbench -a /dev/sdb 
sched_setscheduler: Operation not permitted
/dev/sdb: Operation not permitted

Then I attempted as root, and it worked OK.

It would be nice if flashbench inform user that it only works as root.

Negative differences with no unit

I have built flashbanch at commit d783b1b with the make command, and running it as sudo ./flashbanch -a /dev/sda as the readme recommends results in the following:

align 34359738368       pre 986µs       on 1.01ms       post 1.87ms     diff -412331
align 17179869184       pre 833µs       on 1.19ms       post 875µs      diff 335µs
align 8589934592        pre 690µs       on 1.01ms       post 1.44ms     diff -49389n
align 4294967296        pre 1.13ms      on 1.43ms       post 1.67ms     diff 32.7µs
align 2147483648        pre 582µs       on 935µs        post 1.63ms     diff -173123
align 1073741824        pre 1.21ms      on 1.39ms       post 1.61ms     diff -18714n
align 536870912 pre 980µs       on 1.1ms        post 986µs      diff 114µs
align 268435456 pre 650µs       on 1.09ms       post 1ms        diff 263µs
align 134217728 pre 1.53ms      on 1.53ms       post 1.15ms     diff 187µs
align 67108864  pre 3.42ms      on 3.24ms       post 1.97ms     diff 549µs
align 33554432  pre 1.07ms      on 1.18ms       post 1.21ms     diff 43.4µs
align 16777216  pre 1.31ms      on 1.96ms       post 2.01ms     diff 299µs
align 8388608   pre 995µs       on 1.2ms        post 1.01ms     diff 199µs
align 4194304   pre 3.38ms      on 2.87ms       post 1.07ms     diff 641µs
align 2097152   pre 1.75ms      on 1.59ms       post 1.62ms     diff -93720n
align 1048576   pre 1.04ms      on 1.45ms       post 1.44ms     diff 210µs
align 524288    pre 956µs       on 842µs        post 1.56ms     diff -416828
align 262144    pre 1.5ms       on 1.51ms       post 1.14ms     diff 187µs
align 131072    pre 1.07ms      on 941µs        post 1.59ms     diff -387973
align 65536     pre 1.64ms      on 1.75ms       post 1.34ms     diff 256µs
align 32768     pre 1.42ms      on 1.19ms       post 1.7ms      diff -371078

Multiple lines have negative values without a unit in the diff column

Using --count and --blocksize with different values does not help.

I have found a similar report 10 years ago on the linaro-dev mailing list, it did not get responses.

The test was run on a SanDisk Ultra microSDXC UHS-1 SD card, 128 GB in size, which I bought new earlier this year.
By default it had some kind of FAT partition starting at 16 MB.

Did I do something wrong? Should I run it differently?

Broken URL in README

You may or may not know, or care, but the "Linaro flash memory survey [1]" page at https://wiki.linaro.org/WorkingGroups/KernelArchived/Projects/FlashCardSurvey pointed to by this project's README no longer exists (shows a "This page does not exist [...]" page).

You may want (or not) to update it to wherever the page was moved to, or if it was simply deleted, replace it with the last non-broken page saved at the Web Archive: https://web.archive.org/web/20181027222214/https://wiki.linaro.org/WorkingGroups/KernelArchived/Projects/FlashCardSurvey

Question: Could you please assist interpreting this benchmark?

I'm looking to optimize my card for use with a chroot on android and have trouble interpreting the numbers as explained in the readme. There's a step up from 4k to 8k and then back down from 8k to 16k. And I guess the erase block size is 2M? The linux sysfs reports 4M. From the factory, the partition was aligned to 64k. I'm confused :/

$ sudo flashbench -a /dev/sdb --blocksize=1024 --count=10
align 68719476736	pre 363µs	on 610µs	post 286µs	diff 286µs
align 34359738368	pre 375µs	on 617µs	post 335µs	diff 262µs
align 17179869184	pre 365µs	on 566µs	post 355µs	diff 206µs
align 8589934592	pre 297µs	on 514µs	post 289µs	diff 222µs
align 4294967296	pre 299µs	on 506µs	post 288µs	diff 213µs
align 2147483648	pre 302µs	on 511µs	post 289µs	diff 215µs
align 1073741824	pre 290µs	on 493µs	post 280µs	diff 208µs
align 536870912	pre 298µs	on 515µs	post 292µs	diff 220µs
align 268435456	pre 299µs	on 506µs	post 292µs	diff 210µs
align 134217728	pre 287µs	on 486µs	post 280µs	diff 203µs
align 67108864	pre 294µs	on 502µs	post 290µs	diff 210µs
align 33554432	pre 299µs	on 510µs	post 290µs	diff 216µs
align 16777216	pre 290µs	on 501µs	post 284µs	diff 214µs
align 8388608	pre 287µs	on 504µs	post 278µs	diff 221µs
align 4194304	pre 299µs	on 508µs	post 286µs	diff 216µs
align 2097152	pre 289µs	on 494µs	post 279µs	diff 210µs
align 1048576	pre 286µs	on 304µs	post 286µs	diff 18.2µs
align 524288	pre 280µs	on 296µs	post 278µs	diff 17.3µs
align 262144	pre 286µs	on 302µs	post 285µs	diff 16.2µs
align 131072	pre 286µs	on 303µs	post 287µs	diff 16.7µs
align 65536	pre 290µs	on 303µs	post 290µs	diff 12.9µs
align 32768	pre 293µs	on 304µs	post 292µs	diff 11.7µs
align 16384	pre 294µs	on 307µs	post 294µs	diff 13µs
align 8192	pre 292µs	on 314µs	post 299µs	diff 18.5µs
align 4096	pre 292µs	on 304µs	post 289µs	diff 13.6µs
align 2048	pre 291µs	on 304µs	post 291µs	diff 12.7µs

The card is an adata ausdx256gui3v30sha2-ra1, the only card I could find (on the german market) that advertises both high endurance and class A2 for high IOPS. https://www.adata.com/upload/downloadfile/Datasheet-High%20Endurance%20microSD_20190625v2.pdf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.