Skip to content

Instantly share code, notes, and snippets.

@EugenMayer
Last active September 7, 2019 05:25
Show Gist options
  • Save EugenMayer/ae102b41a190590f0f03487462f1f3be to your computer and use it in GitHub Desktop.
Save EugenMayer/ae102b41a190590f0f03487462f1f3be to your computer and use it in GitHub Desktop.
io test
# we no longer use /tmp sinc it is a tmpfs / in memory
mkdir ~/tmp
cd ~/tmp
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 cleanup > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 prepare > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 run
# when you are done testing
rm -fr ~/tmp
@EugenMayer
Copy link
Author

EugenMayer commented Sep 7, 2019

Ok the mysterie of /tmp is solved - https://wiki.manjaro.org/index.php?title=Fstab#tmpfs

mount -l | grep /tmp
tmpfs on /tmp type tmpfs (rw,noatime)

Means that doing a sysbench in /tmp is basically doing a memory i/o test, instead of doing a disk i/o test - that is why the values are so good.

That is also what finally made the differences in "performance" when we tested the different distos like ubuntu and so on, so of them do not use tmpfs for /tmp out of the box, resulting in "bad performance"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment