login
Header Space

 
 

Re: poor network loopback performance and scalability

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <herbert@...>, <dada1@...>, <netdev@...>, <linux-kernel@...>, <a.p.zijlstra@...>
Date: Monday, April 21, 2008 - 4:11 am

* David Miller <davem@davemloft.net> wrote:


yep, basically the sk_peer trick that AF_UNIX is already using.

it just seems rather more tricky in the 'real skb' localhost case 
because there's no real established trust path we can pass this coupling 
of the two sockets over. Netfilter might affect it and deny a localhost 
connection. Lifetime rules seem rather tricky as well: either end of the 
localhost connection can go away independently so a refcount to the 
socket has to be kept. skb->sk might be something to use, but it looks 
like a dangerous complication and it would burden the fastpath with an 
extra sk reference inc/dec.

... so i'm not implying that any of this is an easy topic to solve (to 
me at least :). But fact is that database connections over localhost are 
very common on web apps and it is very convenient as well. I use it 
myself - AF_UNIX transport is often non-existing in apps and libraries 
or is often just an afterthought with limitations - apps tend to 
gravitate towards a single API. So i dont think "use AF_UNIX" is an 
acceptable answer in this case. I believe we should try to make 
localhost transport comparably fast to AF_UNIX.

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: poor network loopback performance and scalability, David Miller, (Sun Apr 20, 11:38 pm)
Re: poor network loopback performance and scalability, Ingo Molnar, (Mon Apr 21, 4:11 am)
Re: poor network loopback performance and scalability, David Miller, (Mon Apr 21, 4:16 am)
Re: poor network loopback performance and scalability, David Miller, (Mon Apr 21, 6:22 am)
speck-geostationary