← Back to context Comment by megagpt1 5 days ago Databases vendors usually find that read outperforms mmap. Mmap being fast is a myth. 3 comments megagpt1 Reply Asmod4n 5 days ago Tried every way to get contents of a file as fast to a client socket as possible.mmap and io_uring_prep_send were faster than everything else, no matter the size as long as you keep the map around for the lifetime of the process.for one off sends when a file is smaller than 256kb then io_uring_prep_read + prep_send are faster than everything else. megagpt1 3 days ago Databases don't send files to client sockets as fast as possible. They do computation and lots of random access. yxhuvud 5 days ago Note that grandparent actually didn't say they used mmap to actually get the memory, just mapping it.
Asmod4n 5 days ago Tried every way to get contents of a file as fast to a client socket as possible.mmap and io_uring_prep_send were faster than everything else, no matter the size as long as you keep the map around for the lifetime of the process.for one off sends when a file is smaller than 256kb then io_uring_prep_read + prep_send are faster than everything else. megagpt1 3 days ago Databases don't send files to client sockets as fast as possible. They do computation and lots of random access.
megagpt1 3 days ago Databases don't send files to client sockets as fast as possible. They do computation and lots of random access.
yxhuvud 5 days ago Note that grandparent actually didn't say they used mmap to actually get the memory, just mapping it.
Tried every way to get contents of a file as fast to a client socket as possible.
mmap and io_uring_prep_send were faster than everything else, no matter the size as long as you keep the map around for the lifetime of the process.
for one off sends when a file is smaller than 256kb then io_uring_prep_read + prep_send are faster than everything else.
Databases don't send files to client sockets as fast as possible. They do computation and lots of random access.
Note that grandparent actually didn't say they used mmap to actually get the memory, just mapping it.