I/O performance testing with runsc

74 views
Skip to first unread message

Davide Giorgio

unread,
Nov 19, 2020, 7:12:51 AM11/19/20
to gVisor Users [Public]
Goodmorning everyone,
Actually I'm testing the I/O performances in different runtimes using dd.
In particular launching a test like
dd if=/dev/zero of=/my_volume/testfile bs=4k count=262144
I can notice that after having mounted a docker volume inside the container, runsc outperforms other runtimes during the test. The question is: how it is possible if the container should pass through the Gofer to access the fs?

Thanks in advance for your answer!

Adin Scannell

unread,
Nov 19, 2020, 1:58:45 PM11/19/20
to Davide Giorgio, gVisor Users [Public]
Hi Davide,

(answer inline)

The gofer mediates file system access, but may pass a FD to the sandbox via SCM_RIGHTS for regular files. (The sandbox cannot acquire file descriptors itself.) You can find a bit of information about this in the security model and the resource model documentation.
 
Hopefully that answers your question. Happy to answer any others.

Cheers,
-Adin

--
You received this message because you are subscribed to the Google Groups "gVisor Users [Public]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gvisor-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gvisor-users/5bf72a9f-9ff2-4dba-9501-ab4fcd161ff8n%40googlegroups.com.

Davide Giorgio

unread,
Nov 19, 2020, 2:17:50 PM11/19/20
to gVisor Users [Public]
Thank you for your answer Adin,

So during an I/O operation this FD can be used to access to they fs but having performances that are comparable with the host one? There is no difference in I/O throughput testing it using docker volumes or bind volumes?

Thank you again!

Ian Lewis

unread,
Nov 19, 2020, 7:31:08 PM11/19/20
to Davide Giorgio, gVisor Users [Public]
Hi David,

Yeah, the short answer is that, for the reason Adin mentioned, you won't notice as much of a difference in the test you ran but may notice it more in others. For example, if you are opening up a lot of fds (like walking a directory tree) you may notice a bigger difference.



--

Ian Lewis | Developer Advocate | ianl...@google.com | +81 (03)4540-2465

Davide Giorgio

unread,
Nov 20, 2020, 9:18:41 AM11/20/20
to gVisor Users [Public]
Alright, thank your for your answer.
I have another question: there is a difference in I/O performances when writing in the root filesystem of a container or when using a docker volume (bind or not) for the test? 

Thank you again for your time!

Fabricio Voznika

unread,
Nov 23, 2020, 3:18:05 PM11/23/20
to Davide Giorgio, gVisor Users [Public]
There is no different in read and write IO performance to the root filesystem or a container mount. However, there is a difference in performance in other file system operations, like opening a file. That's because the root filesystem is for exclusive use of the container and can be cached more aggressively. While files in container mounts can be changed externally and require revalidation on every access.

I hope it helps,
Fabricio.

Davide Giorgio

unread,
Nov 23, 2020, 3:26:15 PM11/23/20
to gVisor Users [Public]
Than you so much @fabricio !
Reply all
Reply to author
Forward
0 new messages