NetBSD-Users archive

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

Re: Slow read(2) and write(2) syscalls



On Wed, 29 Apr 2020 at 15:37, Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:
>
> On Wed, 29 Apr 2020 09:17:54 +0100
> Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> > On my VirtualBox 6.1.6 guest running -current amd64 I get:
> >
> > $  time cat 80mb > /dev/null
> > cat 80mb > /dev/null  0.00s user 0.02s system 98% cpu 0.021 total
>
> Yeah this test is not very useful, 80MiB is hardly anything and most of
> it is probably going from/to file cache.

Sure; that was the OP was doing.

More realistically

 time dd if=/dev/zero of=out bs=1m count=5000
5000+0 records in
5000+0 records out
5242880000 bytes transferred in 151.411 secs (34626810 bytes/sec)
dd if=/dev/zero of=out bs=1m count=5000  0.01s user 31.65s system 20%
cpu 2:31.42 total

(didn't have 10GB free...)

At the same time on a CentOS guest I get:

]$ time dd if=/dev/zero of=out bs=1M count=5000 conv=fdatasync
5000+0 records in
5000+0 records out
5242880000 bytes (5.2 GB) copied, 19.8532 s, 264 MB/s

even if the NetBSD vm is backed by a M.2 SATA sdd, whereas the CentOS
guest has its vd on a spinning disk.

Read what you want. There have been many discussions regarding the
caching and some specific optimizations under Linux, I recall.



>
> If you write around 10GiB
>
> dd if=/dev/zero of=out bs=1m count=10000
>
> do you get similar I/O throughput on NetBSD and Linux guests?



-- 
----


Home | Main Index | Thread Index | Old Index