Do you think it might be because of indirection layers, that JIT may not able to finely optimize? According to this benchmark Netty is quite comperable to go - https://stressgrid.com/blog/webserver_benchmark/ (also benchmark of serving static content)
a
altavir
12/18/2021, 2:32 PM
It is a good question to ktor developers. I also think, it should be the same in general. But IO operations should be heavier than the overhead from not best optimization.
t
Tomasz Krakowiak
12/18/2021, 2:38 PM
I would expect that, the larger the buffers(and transferred files), the less it matters. Also you mentioned few kb buffer size... than probably it's less of a buffer than OS can handle, resulting in higher syscalls frequency.