News for hackers. Stuff that matters.
Re:Some notes about HTTP/3 by nly on Friday November 23, 2018 @03:10PM (#18518628)
Is it me or does this part make no sense

> But moving from TCP to UDP can get you much the same performance without usermode drivers. Instead of calling the well-known recv() function to receive a single packet at a time, you can call recvmmsg() to receive a bunch of UDP packets at once.

TCP is a streaming protocol, there are no datagrams to read one at a time. Nothing stops you from reading the entire kernel buffer (containing multiple HTTP messages) in to userspace in one syscall.

Re:Some notes about HTTP/3 by detaro on Friday November 23, 2018 @03:38PM (#18518779)
HTTP requests are small, and a read() call only gets you the data from a single connection, so you get one to few packet(s) worth of data per syscall. In contrast, recvmmsg can get you a large bunch of packets across all "connections" in a single syscall.
Re:Some notes about HTTP/3 by nly on Friday November 23, 2018 @03:47PM (#18518824)
Good point. Only that makes sense for servers though since for clients (web browsers etc) sockets will be 'connected' and they will still have lots of sockets anyway. They'll still be epoll()ing or similar.

Not withstanding the other benefits of QUIC, the UDP vs TCP thing wrt to crossing the kernel-userspace boundary doesn't seem that significant.

Re:Some notes about HTTP/3 by detaro on Friday November 23, 2018 @03:53PM (#18518856)
For clients these numbers don't matter as much, many thousands of packets per second doesn't really happen to them. For a server with a fast pipe it does happen. I hope one of the big providers will share numbers. I don't think many of them actually use user-space stacks with TCP, would be interesting if QUIC improves performance measurably.
Re:Some notes about HTTP/3 by neopallium on Friday November 23, 2018 @07:43PM (#18519740)
The client doesn't have to use a "connected" UDP socket either. The client can bind to a random local port and use "sendto" to talk to many servers.
Re:Some notes about HTTP/3 by ldng on Saturday November 24, 2018 @09:32AM (#18522144)
TCP is not only used for HTTP
Re:Some notes about HTTP/3 by jandrese on Friday November 23, 2018 @03:49PM (#18518839)
The problem is from userland you don't get to decide how much data the kernel hands you with the read call, and by default the kernel will try not to let its buffers fill too much so you end up with a lot of context switches as you read out one window's worth of data at a time.

You could do something similar with TCP if there were kernel support, but the article suggests that putting this much complexity in the kernel's TCP stack is a bad idea because it increases the chance of failure--which can be catastrophic in kernel space. Better to have your web browser/server crash instead of the entire machine.

Re:Some notes about HTTP/3 by TazeTSchnitzel on Friday November 23, 2018 @03:31PM (#18518737)
They're not talking about receiving TCP packets there.