2.2 -> 2.4: /proc/net/tcp 10x slower ?

2.2 -> 2.4: /proc/net/tcp 10x slower ?

Post by Sven Rudolp » Tue, 27 Feb 2001 23:40:04



Usually identd's on Linux parse /proc/net/tcp.

When migrating from Linux 2.2.17 to 2.4.2 identd became much slower.

I traced it back to the point where /proc/net/tcp is read.

On the same slightly loaded system:

2.2.17 $ time cat /proc/net/tcp >/dev/null
real    0m0.004s
user    0m0.000s
sys     0m0.010s

(Or sometimes 0.000s due to granularity)

2.2.17 $ time cat /proc/net/tcp >/dev/null
real    0m0.083s
user    0m0.000s
sys     0m0.080s

Is this expected? Or is there a more efficient interface that identd
should use?

        Sven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.2 -> 2.4: /proc/net/tcp 10x slower ?

Post by Sean Hunte » Wed, 28 Feb 2001 00:00:05


The identd wot I wrote is still fast as anything on 2.4 :)

As you can see from this *y sample of my ident log, I take just a little
over 1/100th of a second to respond (on average). :)

2001-02-25 16:18:35.714731500 Q [194.75.152.225] - [32907, 25]
2001-02-25 16:18:35.726085500 A [194.75.152.225] - [9a0c62e79c0df893bb96dd74/3a99305b/b0164] for [32907, 25] UID [506]
2001-02-26 09:41:02.535514500 Q [195.92.249.252] - [33363, 21]
2001-02-26 09:41:02.548884500 A [195.92.249.252] - [8c0babd7b8ab6830b7092839/3a9a24ae/8454c] for [33363, 21] UID [500]

By the way, the intention of my ident server was not to be fast, but just to be
a little simpler and less over-engineered than pidentd, and not to give out any
site-specific information (uid's etc).  The speed was a bonus.

Sean


> Usually identd's on Linux parse /proc/net/tcp.

> When migrating from Linux 2.2.17 to 2.4.2 identd became much slower.

> I traced it back to the point where /proc/net/tcp is read.

> On the same slightly loaded system:

> 2.2.17 $ time cat /proc/net/tcp >/dev/null
> real    0m0.004s
> user    0m0.000s
> sys     0m0.010s

> (Or sometimes 0.000s due to granularity)

> 2.2.17 $ time cat /proc/net/tcp >/dev/null
> real    0m0.083s
> user    0m0.000s
> sys     0m0.080s

> Is this expected? Or is there a more efficient interface that identd
> should use?

>    Sven

> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

> More majordomo info at  http://www.veryComputer.com/
> Please read the FAQ at  http://www.veryComputer.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://www.veryComputer.com/
Please read the FAQ at  http://www.veryComputer.com/

 
 
 

1. net.ipv4.tcp differences from 2.2 to 2.4.x kernel

Could anyone explain to me what are the tcp/ip differences in the kernel
upgrade from 2.2 to 2.4?

I have some software running on a 2.2 kernel to communicate to a remote
embedded system. To get this to communicate I had to disable the
tcp_window_scaling/tcp_sack options.

Now I'm trying to repeat the process on a 2.4 kernel. I've disabled the
options again, but there are still differences in the implementation,
and communication is unsuccessful!

I've used the ethereal sniffer software to compare the tcp/ip traffic
of the two kernels. I notice subtle differences. Firstly, on the SYN
packet, only 58 bytes are sent over the wire. On the 2.2 kernel, the
same 58 bytes are sent + 2 bytes of trailer (60 bytes total) which is
what you would expect!?

Also, the window size of the packets sent with the 2.4 kernel are about
5k. On the 2.2 kernel, the window size sets itself to 32k. I need a
large window size as the software sends large data to the embedded
system. The target advertises its window size as 8760 bytes. By my
understanding, the sender should detect the window size of the receiver
and adjust itself to suit?

I have tried to disable as many net.ipv4.tcp_* options as possible in
the /etc/sysctl.conf file but have not had any luck yet. I also feel as
though I'm stabbing in the dark. Has anyone had similar experience?

any suggestions/opinions welcome

Paul L

2. Security, popclient, suid?

3. glibc2.1.x + gnu.org 'political issues'??

4. Any GNUse trying to back-up Redhat 5.1 files on a H-P T1000e?...

5. rpm question

6. /proc/net/tcp and /proc/net/udp

7. Shared memory: kernel 2.4 *much* slower compared to 2.2?

8. 2.2 -> 2.3 -> 2.4: differences?

9. /proc/kcore behaves differently in 2.4 and 2.2 kernels.

10. tcp slowness in 2.2.x vs 2.4.x