Problems with testing gVisor using sysbench

123 views
Skip to first unread message

xingyu wang

unread,
Jun 1, 2021, 8:10:47 AM6/1/21
to gVisor Users [Public]
Hi everyone,
The test command: sysbench oltp_read_only.lua --threads=2 --mysql-host=localhost --mysql-user=sbtest --mysql-password=pass --mysql-port=3306 --tables=2--table-size=10000 prepare

When I test the gVisor database read and write performance with the above command, the test program has an error. When i tested the docker container with the same command, there are no errors. Does anybody know why that is?

Error message: 
FATAL: mysql_drv_query()  returned error 14(Can't change size of file(OS  errno 22 - Invalid argument)) for query 'INSERT INTO sbtest1(k,c,pad) VALUES(.......)




Ayush Ranjan

unread,
Jun 1, 2021, 1:57:07 PM6/1/21
to gVisor Users [Public]
Hi,

Could you shared how you have configured the mentioned benchmark "oltp_read_only.lua". Be sure to include as much information as possible that will help reproduce the issue (eg. Dockerfile).
I also see that you have two other email threads (possibly duplicates) asking about read/write performance with gVisor. Could you include reproduction instructions for that as well.

Message has been deleted

space

unread,
Jun 1, 2021, 11:34:26 PM6/1/21
to gVisor Users [Public]

Thank you very much for your answers, the following is my detailed description of the problem, I hope to help solve the problem.

1. I installed gVisor according to the instructions in the official gVisor documentation (Install latest release)

2. I use the Docker command to create and start the gVisor container (sudo docker run –it –runtime=runsc sysbench (image ID))

3. I installed mysql (5.7.34-0ubuntu0.18.04.1) and sysbench (1.0.11) in a container, and used sysbench to test the database read and write performance.

4. I found that if the -overlay option is added to the runtime part of the runsc of /etc/docker/daemon.json, the error message mentioned above will not appear. But if I use the "--file-access=shared" option, or use the default file system configuration, an error message will appear.

5. In the file system performance test section of the gVisor official document (performance guide), there is a paragraph: The high overhead comes principally from the VFS implementation that needs improvement, with several internal serialization points (since all requests are reading the same file ). Note that some of some of network stack performance issues also impact this benchmark. Can you explain this passage in detail so that I can understand the reasons more deeply.

 6, oltp_common.lua and oltp_read_write.lua (using the test script will also produce the same error prompt) are the scripts used in the sysbench test. Config.json is the configuration file generated by gVisor.

attachment.rar

Ayush Ranjan

unread,
Jul 9, 2021, 6:15:10 PM7/9/21
to gVisor Users [Public]
Hi,

Sorry for the late reply. I am having trouble reproducing this. Can you share the Dockerfile for your sysbench image? I assume that does all the installation for mysql and sysbench.
I am also new to mysql. I followed a few guides to install it and start it in a container. But sysbench keeps failing with connection errors saying it can not connect to mysql.

So can you share your Dockerfile and instructions on how you set up your mysql DB inside the container. Like what does your my.cnf file look like?
Above you have attached the config.json file which tells about the container configuration but I don't know what base image you have used and what installation commands you used.

Zach Koopmans

unread,
Jul 9, 2021, 6:44:14 PM7/9/21
to gVisor Users [Public]
If it helps, we use sysbench in our Docker benchmark suite: sysbench benchmark Here's the Dockerfile.
Reply all
Reply to author
Forward
0 new messages