Here is a bug I found.

Florian Weimer fw@deneb.enyo.de
Mon Mar 23 12:34:14 GMT 2020


* unlvsur unlvsur:

> That is not WSL2’s fault. Syscall is always expensive. Improving
> WSL2 does not solve anything. WSL2 uses socket for connection. 4096
> bufsize is always too small. 4096 is stuck in 1980s. (std::deque was
> 4096 before it enters C++ standard library)

A Linux system call takes less than a microsecond.  This means that
the system call overhead is not a limiting factor for storage devices
that are typical today.

> Now, CPU is much faster however syscall is even more expensive due
> to extra safety checking.
>
> 65536 is a fair number for most platform now.
>
> 1048576 should be the number on Windows since windows syscall is
> even more expensive.

This heavily penalizes random I/O, though.  I don't think we can make
this change.


More information about the Libstdc++ mailing list