Measure serial port performance
Closed this issue · 3 comments
Perform raw read / write performance tests of vmrt
's serial port interface, in order to determine a theoretical maximum transfer rate of network endpoints.
Endpoint throughput caps the transfer values within golemfactory/yagna#2103
Environment description
OS
Ubuntu 22.04.1 LTS
Transferred file
test.bin
- 10 GB, 10737418240 B
composed of0
s
Binaries
-
ya-runtime-vm
, built in debug mode
https://github.com/golemfactory/ya-runtime-vm/tree/mf/vm-perf-test @ 6549c5f -
ya-runtime-dbg
, built in debug mode
https://github.com/golemfactory/ya-runtime-dbg @ 98fab12 -
socat
utility for communicating withvmrt
's unix socket (dedicated serial port)
VM image
Base Alpine Linux Docker image
VM spawn command
ya-runtime-dbg -w /tmp/vm-test -r /usr/lib/yagna/plugins/ya-runtime-vm/ya-runtime-vm --task-package /tmp/docker-vm-testing-latest-0d6e10dbb5.gvmi
Sending data to the VM
Host command
socat unix-connect:/tmp/59c74ab1497548798f7f26acee9e8c1b_test.sock ./test.bin
VM command
time cat /dev/vport0p4 > /dev/null
Results
15 executions, averaging at 20,0916s spent receiving the file.
509.67 MiB/s (534423253.498975 B/s)
Receiving data from the VM
Host command
socat -u unix-connect:/tmp/59c74ab1497548798f7f26acee9e8c1b_test.sock /dev/null
VM command
time dd if=/dev/urandom bs=1M count=10240 > /dev/vport0p4
Results
10 executions, averaging at 26,5328s spent sending data.
385.94 MiB/s (404684701.200024 B/s)