Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 02:11:15 +0200
From:      "Miroslav Slavkov" <miroslav@svishtov.net>
To:        freebsd-net@freebsd.org
Subject:   dummynet high cpu load
Message-ID:  <20090118021115.53633c6a@mail.svishtov.net>

next in thread | raw e-mail | index | archive | help
Hello,

 I have a strange thing going on with dummynet. I'm loading around 11000=
 pipes.
 The machine does not forward, generate or receive any traffic. The only=
 running service is ssh. It's for developing purposes.

 The thing happening is when loading more than 10700 pipes. The dummynet=
 process begins to eat around %50 of cpu. If i load only 10000 pipes, it=
 is using 0% cpu.
=20
 Some output:

# ipfw show
65535 612000 126865054 allow ip from any to any

# ipfw pipe show| wc -l
    10001

# top -Sd 2
last pid: 35787;  load averages:  0.11,  0.17,  0.16                    =
                                                       up 0+11:29:29  01=
:53:51
73 processes:  6 running, 53 sleeping, 14 waiting
CPU:  0.0% user,  0.0% nice, 25.1% system,  0.2% interrupt, 74.7% idle
Mem: 23M Active, 20M Inact, 156M Wired, 48K Cache, 38M Buf, 781M Free
Swap: 4096M Total, 4096M Free

  PID USERNAME       THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU C=
OMMAND
   12 root             1 171 ki31     0K    16K RUN    0 566:04 99.37% i=
dle: cpu0
   11 root             1 171 ki31     0K    16K RUN    1 459:35 99.07% i=
dle: cpu1
   36 root             1 -68    -     0K    16K CPU0   0 343:55  0.00% d=
ummynet


Still.. while loading the rules (one row per pipe config, with script fo=
r pipe counting...) the dummynet process begins to raise the usage after=
 4000 or some pipes. It gets to 0% after 10-20 secs.


# ipfw pipe show | wc -l
   10701

# top -Sd2
last pid: 57219;  load averages:  0.32,  0.23,  0.18                    =
                                                       up 0+11:37:13  02=
:01:35
73 processes:  5 running, 54 sleeping, 14 waiting
CPU:  0.0% user,  0.0% nice, 25.2% system,  0.0% interrupt, 74.8% idle
Mem: 23M Active, 21M Inact, 156M Wired, 48K Cache, 38M Buf, 781M Free
Swap: 4096M Total, 4096M Free

  PID USERNAME       THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU C=
OMMAND
   11 root             1 171 ki31     0K    16K RUN    1 465:48 91.26% i=
dle: cpu1
   12 root             1 171 ki31     0K    16K RUN    0 568:09 59.38% i=
dle: cpu0
   36 root             1 -68    -     0K    16K CPU0   0 350:22 51.56% d=
ummynet


# uname -rp
7.1-STABLE amd64

The system is last updated on 15 Jan 2009.

The pipes are simple enough: ipfw pipe X config bw =3F=3F=3F=3FKbit/s
Seems strange, because no rules are applied. The load is still around 50=
% even if the firewall is turned off with the sysctl option.

Any clues=3F



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090118021115.53633c6a>