Sysbench test Mysql but no disk read

169 Views Asked by At

When I use sysbench to test mysql, I use iotop to monitor io and I find only have DiSH WRITE speed, the DISK READ speed is always 0. Then I use free -h and I find that buffer/cache increase, does it mean that sysbench's test data is not write in disk but in buffer and no auto update into disk?

Thank you so much!

1

There are 1 best solutions below

5
au kk On BEST ANSWER

where is the mysql running ?? I dont know about iotop and what its measuring but even tiny sysbench runs generate enormous IO. it could be a user issue maybe, perhaps mysql is generating io under a different user and not getting picked up.

# you can isolate the db into a container and run sysbench against this to see
# if/when/how much IO there is.

docker run --rm -it --name mdb105 --network host -e MYSQL_ALLOW_EMPTY_PASSWORD=on mariadb:10.5 --port=10306

# in another terminal run
docker stats

# now run sysbench, and you will see enormous IO

# you can get another shell in container named mdb105 by:
docker exec -it --user root mdb105 bash

# mariadb:10.5 is based on ubuntu:20.04
# you could maybe run iotop inside the container

Update: I was able to replicate something like your zero IO situation using a raspberry pi. indeed docker stats shows no IO while clearly data is being saved to disk. my initial reaction was that maybe some kernels/distro are missing certain facilities, but it looks like its not kernel/distro because i saw IO when playing around with disk/fs ie extenal USB disk ... i think it was more to do with the micro sd card and its controller/drivers that dont support this kind of stats. and since your tps is very low i suspect you are on something similar to micro sd as well.

this likely wont happen in a ec2 instance.