Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 133242

Summary: dhcpcd using constant 1%-3% CPU under unrelated network load
Product: Gentoo Linux Reporter: Greg Poucher <gregp01>
Component: Current packagesAssignee: Roy Marples (RETIRED) <uberlord>
Status: RESOLVED FIXED    
Severity: trivial CC: radek
Priority: High    
Version: 2005.0   
Hardware: AMD64   
OS: Linux   
URL: http://forums.gentoo.org/viewtopic-p-3291091.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Sleep for a second between kernel buffer flushes

Description Greg Poucher 2006-05-13 15:09:30 UTC
(Note that this issue is probably not specific to AMD64, but that is my processor architecture, and the others experiencing this problem did not specify theirs.)

dhcpcd is using a constant 1% to 3% CPU when the network is under load. For instance, I am running Azureus (a BitTorrent client) on a Windows XP machine on my network. Azureus is reading and writing all its data from/to my Gentoo server running Samba. When running multiple torrents simultaneously (which results in many non-contiguous reads and writes with low locality), not only is Samba itself using 3% to 5% of my CPU, but dhcpcd uses a constant 1% to 3%, resulting in a total CPU time of many hours over the course of a week.

This issue has been experienced by others under several different circumstances:
http://forums.gentoo.org/viewtopic-p-3291091.html

I first noticed it after upgrading from dhcpcd-2.0.0 to 2.0.3. The bug is still present in 2.0.4, and is slightly improved in 2.0.5 (intermittent fractions of a percent of CPU usage, adding up to fractions of a second of CPU time over several minutes). Reverting to dhcpcd-2.0.0 completely solves this problem.


My emerge --info, though it most likely does not pertain to this bug:
Portage 2.0.54 (default-linux/amd64/2005.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64 -m3dnow -mmmx -msse -msse2 -mno-sse3 -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=athlon64 -m3dnow -mmmx -msse -msse2 -mno-sse3 -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aim alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr cli crypt cups curl dga divx4linux dri dvd dvdr dvdread eds emboss emul-linux-x86 encode esd exif expat fam ffmpeg foomaticdb fortran ftp gdbm gif gnome gpm gstreamer gtk gtk2 icq idn ieee1394 imlib ipv6 isdnlog java javascript jpeg kde kdeenablefinal lcms libwww lirc lm_sensors lzw lzw-tiff mad mbox mhash mng mp3 mpeg mysql ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl php png ppds pppd python qt quicktime readline reflection samba sdl session sftplogging slp sndfile spell spl ssl svg tcpd threads tiff truetype truetype-fonts type1-fonts udev usb v4l vcd vorbis xml2 xmms xorg xpm xv xvid yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-06-02 07:19:49 UTC
Created attachment 88184 [details, diff]
Sleep for a second between kernel buffer flushes

This patch should fix the issue
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-06-05 04:20:46 UTC
Fixed in dhcpcd-2.0.6