Skip to contentSkip to conversation

Linux 2.4.1 network (socket) performance

DISCUSSION Richard B. Johnson 3 participants 3 messages Feb 23, 2001 – Feb 27, 2001 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,
The problem with awful socket performance on 2.4.1 has been discovered and fixed by Manfred Spraul. Here is some info, and his patch:

Quoted 3 lines · Manfred Spraul

Could you post your results to linux-kernel?
My mail from this morning wasn't accurate enough, you patched the wrong line. Sorry.

Yep. The patch you sent was a little broken. I tried to fix it, but ended up pathing the wrong line.

Quoted 5 lines

I've attached the 2 patches that should cure your problems. patch-new is integrated into the -ac series, and it's a bugfix - simple unix socket sends eat into memory reserved for atomic allocs. patch-new2 is the other variant, it just deletes the fallback system.

net/core/sock.c.new renamed from net/core/sock.c +1 -1
@@ -777,7 +777,7 @@
 				/* The buffer get won't block, or use the atomic queue.
 			 	* It does produce annoying no free page messages still.
 			 	*/
-				skb = alloc_skb(size, GFP_BUFFER);
+				skb = alloc_skb(size, sk->allocation & (~__GFP_WAIT));
 				if (skb)
 					break;
 				try_size = fallback;

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of course you get it all back when you reboot..."; Actual explanation obtained from the Micro$oft help desk.

#2 lore raw
Quoted 1 line · Richard B. Johnson
Quoted 1 line

unix socket sends eat into memory reserved for atomic allocs.

OK (Manfred is being quoted here, to be clear).

I'm still talking with Alexey about how to fix this, I might just prefer killing this fallback mechanism of skb_alloc_send_skb then make AF_UNIX act just like everyone else.

This was always just a performance hack, and one which makes less and less sense as time goes on.

Later,
David S. Miller
[email protected]

#3 lore raw
Quoted 6 lines

I'm still talking with Alexey about how to fix this, I might just prefer killing this fallback mechanism of skb_alloc_send_skb then make AF_UNIX act just like everyone else.

This was always just a performance hack, and one which makes less and less sense as time goes on.

When I first did the hack it was worth about 20% performance, but at the time the fallback allocation and initial allocations didnt eat into pools in a problematic way