public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression
@ 2007-09-30 15:22 Denys
  0 siblings, 0 replies; 25+ messages in thread
From: Denys @ 2007-09-30 15:22 UTC (permalink / raw)
  To: linux-kernel

P.S. It seems SLAB/SLUB doesn't make much difference, just seems SLUB use a 
bit more some resources.
Still problem appearing with softirqd/0 or softirqd/1 taking a lot CPU (while 
on 2.6.21 it never came up of the "top"), and doesn't matter - if NAPI on 
e1000 disabled or enabled. Additionally disabling all disk operations doesn't 
make any difference.

defaulthost ~ #mpstat 1
Linux 2.6.23-rc8-build-0017 (defaulthost)       09/30/07

21:20:29     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal
   %idle    intr/s
21:20:30     all   21.11    0.00   14.57    8.04    0.00   48.74    0.00    
7.54   3632.00
21:20:31     all   23.38    0.00   12.94   10.95    0.00   52.74    0.00    
0.00   1524.00
21:20:32     all   21.50    0.00   16.50    8.50    0.00   53.50    0.00    
0.00   1473.00
21:20:33     all   22.39    0.00   14.93    4.98    0.50   53.23    0.00    
3.98   1492.08
21:20:34     all    5.31    0.00    0.97    0.48    0.00   93.24    0.00    
0.00   1351.96

On 2.6.21 it looks:

defaulthost ~ #mpstat 1
Linux 2.6.21-gentoo-r3-build-0015 (defaulthost)         09/30/07

18:21:50     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal
   %idle    intr/s
18:21:51     all   29.50    0.00   21.50   12.50    0.00    6.00    0.00   
30.50   8416.00
18:21:52     all   26.00    0.00   19.00   12.50    0.50    7.00    0.00   
35.00   8663.64
18:21:53     all   27.23    0.00   17.82   13.37    0.99    6.44    0.00   
34.16   7828.71
18:21:54     all   26.13    0.00   16.08   18.59    0.00    7.04    0.00   
32.16   8657.58
18:21:55     all   22.89    0.00   16.92   18.91    0.50    6.47    0.00   
34.33   7957.43
18:21:56     all   28.14    0.00   21.61   17.59    0.50    6.03    0.00   
26.13   8531.00



--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.


^ permalink raw reply	[flat|nested] 25+ messages in thread
* 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression
@ 2007-09-30 17:31 Denys
  0 siblings, 0 replies; 25+ messages in thread
From: Denys @ 2007-09-30 17:31 UTC (permalink / raw)
  To: linux-kernel

P.S.S. 
I tried changing clocksource from acpi_pm to tsc. No difference.
Tried to lock eth0 by smp_affinity to single CPU (no other interrups, except 
ioapic timer(LOC) there). No luck. I tried to change hashes in nf_conntrack, 
no difference. Tried to change eth0 weidht - no difference.

Also i notice, that exactly when softirqd start using CPU nearby 100% - 
problems happens.

At this time (with or without nice - the same, also the same to ping any host 
in network)

defaulthost ~ #nice -n -10 ping -s 10000 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 10000(10028) bytes of data.

10008 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=377 ms
10008 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=328 ms
10008 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=329 ms
10008 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=355 ms
10008 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.047 ms

Delay value is ALWAYS nearby same. 350-360ms.

At same time if i ping "buggy 2.6.23-rc8" box, ping delay is perfect.

100000 packets transmitted, 100000 received, 0% packet loss, time 41793ms
rtt min/avg/max/mdev = 0.027/0.127/1.439/0.095 ms, ipg/ewma 0.417/0.065 ms

There is nothing running except:
squid, globax (TCP accelerator).
Logs, disk cache on squid is disabled.
Important note - there is conntract and REDIRECT used.

defaulthost /config #cat /proc/net/sockstat
sockets: used 10670
TCP: inuse 12734 orphan 1390 tw 20248 alloc 12751 mem 9903
UDP: inuse 5
UDPLITE: inuse 0
RAW: inuse 0
FRAG: inuse 0 memory 0

defaulthost /config #cat /proc/net/softnet_stat
96c0060c 00000000 003fa90a 00000000 00000000 00000000 00000000 00000000 
00000000
926120af 00000000 003e8692 00000000 00000000 00000000 00000000 00000000 
00000000

defaulthost /config #cat /proc/net/ip_conntrack|wc -l
69256
(other host running 200K easily)

What can cause delays ~350-360ms for userspace applications?

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.


^ permalink raw reply	[flat|nested] 25+ messages in thread
* 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression
@ 2007-09-30 14:48 Denys
  2007-09-30 17:48 ` Eric Dumazet
  0 siblings, 1 reply; 25+ messages in thread
From: Denys @ 2007-09-30 14:48 UTC (permalink / raw)
  To: linux-kernel

I've moved recently one of my proxies(squid and some compressing application) 
from 2.6.21 to 2.6.22, and notice huge performance drop. I think this is 
important, cause it can cause serious regression on some other workloads like 
busy web-servers and etc.

After some analysis of different options i can bring more exact numbers:

2.6.21 able to process 500-550 requests/second and 15-20 Mbit/s of traffic, 
and working great without any slowdown or instability.

2.6.22 able to process only 250-300 requests and 8-10 Mbit/s of traffic, ssh 
and console is "freezing" (there is delay even for typing characters).

Both proxies is on identical hardware(Sun Fire X4100), configuration(small 
system, LFS-like, on USB flash), different only kernel.

I tried to disable/enable various options and optimisations - it doesn't 
change anything, till i reach SLUB/SLAB option.

I've loaded proxy configuration to gentoo PC with 2.6.22 (then upgraded it to 
2.6.23-rc8), and having same effect.
Additionally, when load reaching maximum i can notice whole system slowdown, 
for example ssh and scp takes much more time to run, even i do nice -n -5 for 
them.

But even choosing 2.6.23-rc8+SLAB i noticed same "freezing" of ssh (and sure 
it slowdown other kind of network performance), but much less comparing with 
SLUB. On top i am seeing ksoftirqd taking almost 100% (sometimes ksoftirqd/0, 
sometimes ksoftirqd/1).

I tried also different tricks with scheduler (/proc/sys/kernel/sched*), but 
it's also didn't help.

When it freezes it looks like:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    7 root      15  -5     0    0    0 R   64  0.0   2:47.48 ksoftirqd/1
 5819 root      20   0  134m 130m  596 R   57  3.3   4:36.78 globax
 5911 squid     20   0 1138m 1.1g 2124 R   26 28.9   2:24.87 squid
   10 root      15  -5     0    0    0 S    1  0.0   0:01.86 events/1
 6130 root      20   0  3960 2416 1592 S    0  0.1   0:08.02 oprofiled


Oprofile results:


Thats oprofile with 2.6.23-rc8 - SLUB

73918    21.5521  check_bytes
38361    11.1848  acpi_pm_read
14077     4.1044  init_object
13632     3.9747  ip_send_reply
8486      2.4742  __slab_alloc
7199      2.0990  nf_iterate
6718      1.9588  page_address
6716      1.9582  tcp_v4_rcv
6425      1.8733  __slab_free
5604      1.6339  on_freelist


Thats oprofile with 2.6.23-rc8 - SLAB

CPU: AMD64 processors, speed 2592.64 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit 
mask of 0x00 (No unit mask) count 100000
samples  %        symbol name
138991   14.0627  acpi_pm_read
52401     5.3018  tcp_v4_rcv
48466     4.9037  nf_iterate
38043     3.8491  __slab_alloc
34155     3.4557  ip_send_reply
20963     2.1210  ip_rcv
19475     1.9704  csum_partial
19084     1.9309  kfree
17434     1.7639  ip_output
17278     1.7481  netif_receive_skb
15248     1.5428  nf_hook_slow

My .config is at http://www.nuclearcat.com/.config (there is SPARSEMEM 
enabled, it doesn't make any noticeable difference)

Please CC me on reply, i am not in list.

--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-10-01 20:57 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-30 15:22 2.6.21 -> 2.6.22 & 2.6.23-rc8 performance regression Denys
  -- strict thread matches above, loose matches on Subject: below --
2007-09-30 17:31 Denys
2007-09-30 14:48 Denys
2007-09-30 17:48 ` Eric Dumazet
2007-09-30  4:25   ` Nick Piggin
2007-09-30 22:04     ` Denys
2007-10-01 10:01       ` Andi Kleen
2007-10-01 10:30         ` Denys
2007-10-01 11:14           ` Andi Kleen
2007-10-01 11:52             ` Denys
2007-10-01 11:57               ` Andi Kleen
2007-10-01 12:04                 ` Denys
2007-09-30 22:35     ` Denys
2007-10-01  5:59       ` Eric Dumazet
2007-10-01  7:12         ` David Miller
2007-10-01  8:07           ` Denys
2007-10-01  8:20             ` Eric Dumazet
2007-10-01  8:35               ` Eric Dumazet
2007-10-01 12:10               ` Denys
2007-10-01 13:26               ` Denys
2007-10-01 20:10         ` Eric Dumazet
2007-10-01 20:57           ` David Miller
2007-09-30 23:24     ` Denys
2007-10-01  6:43     ` Denys
2007-09-30 18:45   ` Denys

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox