NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Slow read(2) and write(2) syscalls



Hi,

some calls to read(2) or write(2) take almost exactly 0.5 seconds, while
most other syscalls are fast as usual. What could be the reason?

I'm running NetBSD 8.0 x86_64 inside VirtualBox 6.1 on a Windows 10
host. Add hard disks in that VM are added via a SCSI controller. One one
of the disks I created a file containing random data and read that via
cat(1). It looks like this:

~ $ time cat 80mb >/dev/zero

real    0m14.521s
user    0m0.000s
sys     0m14.521s

43.992198659 CALL  write(1,0x7e791cd01000,0x4000)
43.992255371 RET   write 16384/0x4000
43.992261517 CALL  read(3,0x7e791cd01000,0x4000)
44.492970628 RET   read 16384/0x4000
44.492981523 CALL  write(1,0x7e791cd01000,0x4000)
44.493084051 RET   write 16384/0x4000
44.493091315 CALL  read(3,0x7e791cd01000,0x4000)
44.493145233 RET   read 16384/0x4000

The VM has plenty of free memory, and the VM is otherwise unused. I ran
the "benchmark" in /var/shm as well and got mixed results:

/var/shm $ time cat 80mb >/dev/zero
sys     0m9.607s

/var/shm $ time cat 80mb >/dev/zero
sys     0m4.705s

/var/shm $ time cat 80mb >/dev/zero
sys     0m2.427s

/var/shm $ time cat 80mb >/dev/zero
sys     0m8.669s

/var/shm $ time cat 80mb >/dev/zero
sys     0m2.376s

How can I further research where this artificial delay comes from, and
finally fix it?

Roland


Home | Main Index | Thread Index | Old Index