Virtual threads and File IO
Francesco Nigro
nigro.fra at gmail.com
Sat Jun 1 08:01:07 UTC 2024
Afaik every I/O (either socket/file-related ones) as executed in place. The
file related ones, unless DIRECT_IO is used, are still Vs the OS page
cache, which means are not that much slower, although user-kernel-user
transition is clearly in place (with its inherent cost).
AFAIK this could change if io_uring is used because submission ring buffers
are not meant to be used concurrently and only socket requests are actually
executed in-place (unless specified differently).
Il sab 1 giu 2024, 00:44 Robert Engels <robaho at me.com> ha scritto:
> Hi,
>
> An interesting question came up on the Go support channels. One of the
> principle engineers stated that for local file IO, the Go routine (similar
> to virtual thread) won’t release the carrier thread.
>
> Is this the same with Java virtual threads? Yes, local IO is typically
> fast - but it is still order of magnitudes slower than memory computations
> - which the virtual thread could be doing while waiting for the IO request
> to be serviced.
>
> R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240601/471c35bf/attachment.htm>
More information about the loom-dev
mailing list