Re: cat /proc/net/tcp takes 0.5 seconds on x86_64
From: Eric Dumazet <hidden>
Date: 2008-08-27 23:09:28
David Miller a écrit :
From: Andi Kleen <redacted> Date: Thu, 28 Aug 2008 00:34:10 +0200quoted
It fixes an old performance problem at least. I'm not aware of any new ones in this area because the code in this function hasn't changed since I last looked.That's exactly what this thread is about, things got slower for some reason even though nothing specifically changed in this area. I wonder if indirectly something changed in how the hash table allocator code down in mm/*.c works, perhaps it's taking NUMA into account differently now?
Not really, I suspect commit (a7ab4b501f9b8a9dc4d5cee542db67b6ccd1088b [TCPv4]: Improve BH latency in /proc/net/tcp) is responsible for longer delays. Note that its rather old : Date: Sun Jun 10 17:33:08 2007 -0700 We used to disable bh once, while reading the table. This sucked. In case machine is handling trafic, we now are preemptable by softirqs while reading /proc/net/tcp. Thats a good thing. By the way, I find Andi patch usefull. Same thing could be done for /proc/net/rt_cache.