You are not logged in.

#1 2010-05-06 12:10:29

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

XMonad High Cpu Usage

Hi all, I've been running XMonad for a couple of years and love it, on a desktop pc,  AMD phenom 9950 with 4 gigs of ram.
It runs great and after a lot of messing around I've got a setup I really like, but lately 90% of my time is spent on an old laptop 1.4ghz 1 gig ram and after logging into XMonad the cpu sits at 30% usage. htop doesn't show anything obvious, X uses about 7% cpu. Using xorg 1.8 but it was the same with 1.7.

So instead I've been using 2wm or dwm they normally sit around 4%-8% cpu.
I've tried stripping the xmonad.hs of everything I don't need, using a very simple config and no statusbar of any kind and the cpu is still around 30%.

I start all wm's the same way with the same daemons running, tried using the official release and downloading from darcs with the same result, just wondering if anybodys come across something similar and found anyway of fixing it.

Cheers
Paul-S

Last edited by Paul-S (2010-05-06 12:11:47)

Offline

#2 2010-05-06 13:48:24

raf_kig
Member
Registered: 2008-11-28
Posts: 143

Re: XMonad High Cpu Usage

What does powertop say? XMonad shouldn't create any CPU usage while idling.

Offline

#3 2010-05-06 14:26:01

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: XMonad High Cpu Usage

I run it on my 1.6Ghz netbook with no problems.  The cpu is downclocked to 800Mhz most of the time and my idle is still only at 1%-4%.  That's definitely some strange behavior.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#4 2010-05-06 14:50:13

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: XMonad High Cpu Usage

/edit: ignore me; just read your post again and it answered my question...

Last edited by brisbin33 (2010-05-06 14:50:44)

Offline

#5 2010-05-06 15:01:41

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: XMonad High Cpu Usage

Heres my powertop output

PowerTOP 1.11   (C) 2007, 2008 Intel Corporation 

Collecting data for 15 seconds 


Cn              Avg residency
C0 (cpu running)        (31.7%)
polling          0.0ms ( 0.0%)
C1 halt          0.0ms ( 0.0%)
C2          0.3ms ( 0.1%)
C3          9.1ms (68.2%)
P-states (frequencies)
Wakeups-from-idle per second : 77.8    interval: 15.0s
Power usage (ACPI estimate): 21.4W (1.1 hours) 
Top causes for wakeups:
  56.1% (130.4)     <kernel core> : hrtimer_start_range_ns (tick_sched_timer) 
   9.7% ( 22.5)               cat : acpi_ec_transaction_unlocked (process_timeout) 
   8.6% ( 19.9)       <interrupt> : ata_piix 
   7.5% ( 17.4)       <interrupt> : ipw2200 
   5.2% ( 12.0)               cat : schedule_timeout_uninterruptible (process_timeout) 
   4.2% (  9.7)     <kernel core> : hrtimer_start (tick_sched_timer) 
   1.3% (  3.1)       <interrupt> : i915 
   1.3% (  3.1)             urxvt : sys_epoll_wait (process_timeout) 
   0.9% (  2.1)     <kernel core> : cfq_completed_request (cfq_idle_slice_timer) 
   0.8% (  1.8)                 X : i915_add_request (i915_hangcheck_elapsed) 
   0.7% (  1.7)             sleep : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.4% (  1.0)     <kernel core> : sk_reset_timer (tcp_delack_timer) 
   0.4% (  0.9)                 X : hrtimer_start (it_real_fn) 
   0.4% (  0.9)                 X : queue_delayed_work (delayed_work_timer_fn) 
   0.3% (  0.7)               feh : blk_plug_device (blk_unplug_timeout) 
   0.2% (  0.5)       <interrupt> : eth0 
   0.2% (  0.5)               feh : e100_watchdog (e100_watchdog) 
   0.2% (  0.5)       offlineimap : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.2% (  0.5)         ipw2200/0 : queue_delayed_work (delayed_work_timer_fn) 
   0.2% (  0.5)             conky : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.1% (  0.3)               feh : cfq_completed_request (cfq_idle_slice_timer) 
   0.1% (  0.3)          chromium : sys_epoll_wait (process_timeout) 
   0.1% (  0.3)            thunar : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.1% (  0.3)       offlineimap : sk_reset_timer (tcp_write_timer) 
   0.1% (  0.2)              init : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.1% (  0.2)      wicd-monitor : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.1% (  0.2)       offlineimap : blk_plug_device (blk_unplug_timeout) 
   0.1% (  0.1)          chromium : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.1% (  0.1)                 X : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)       <interrupt> : PS/2 keyboard/mouse/touchpad 
   0.0% (  0.1)                 X : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.0% (  0.1)          events/0 : queue_delayed_work (delayed_work_timer_fn) 
   0.0% (  0.1)             crond : hrtimer_start_range_ns (hrtimer_wakeup) 
   0.0% (  0.1)         setxkbmap : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)           xkbcomp : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)             sleep : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)         kblockd/0 : blk_add_timer (blk_rq_timed_out_timer) 
   0.0% (  0.1)           battery : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)               cut : cfq_completed_request (cfq_idle_slice_timer) 
   0.0% (  0.1)                sh : cfq_completed_request (cfq_idle_slice_timer)

Offline

#6 2010-05-16 08:43:03

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: XMonad High Cpu Usage

Installing gdm and using that to control the login fixed my high cpu usage.
Running from startx or slim gave me an idling use  of 30%, gdm give me an idling cpu use of 4%.
Doesn't make sense that the supposedly heavier option should be lighter on the cpu, but it work for me smile

Cheers
Paul-S

Offline

#7 2010-05-16 12:13:50

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: XMonad High Cpu Usage

sounds like you have something nasty in your xinitrc then.

For reference, xmonad almost never goes over 0.2% on my q6600


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#8 2010-05-16 13:08:51

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: XMonad High Cpu Usage

Yeah weird thing is though my .xinitrc just had a list of start scripts for xmonad, dwm, 2wm etc and all the scripts were identical,
except for the wm being started, so I thought maybe it was something Arch related, common sense
says its obviously not.
So I installed Debian and cpu use was low and it was using gdm to log in, so I installed
Arch again and used gdm and now its fine.

Cheers
Paul-S

Offline

Board footer

Powered by FluxBB