Hi there, I am using mpd (still 0.13.2) on debian lenny.
I turned an older notebook into a home-server/music-player mostly to save energy and cut down the noise. To check on the power consumption I use "powertop" which (watched via an ssh login) states that there are less than 10 Wakeups-from-idle per second: > Cn Avg residency P-states (frequencies) > C0 (cpu running) ( 0.1%) 750 Mhz 0.0% > polling 0.0ms ( 0.0%) 563 Mhz 0.0% > C1 halt 0.0ms ( 0.0%) 375 Mhz 0.0% > C2 0.0ms ( 0.0%) 188 Mhz 100.0% > C3 206.5ms (99.9%) > > Wakeups-from-idle per second : 4.8 interval: 30.0s > no ACPI power usage estimate available > > Top causes for wakeups: > 16.3% ( 1.0) mpd : schedule_timeout (process_timeout) > 16.3% ( 1.0) ifconfig : b44_open (b44_timer) > 16.3% ( 1.0) xfsaild : schedule_timeout (process_timeout) > 13.6% ( 0.8) xfsbufd : schedule_timeout (process_timeout) > 8.2% ( 0.5) <kernel core> : schedule_delayed_work_on > (delayed_work_timer_fn) > 4.3% ( 0.3) <interrupt> : uhci_hcd:usb3, eth0 > 4.3% ( 0.3) <kernel core> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 3.8% ( 0.2) <kernel module> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 3.3% ( 0.2) <kernel core> : __netdev_watchdog_up (dev_watchdog) > 3.3% ( 0.2) runsvdir : schedule_timeout (process_timeout) > 3.3% ( 0.2) init : schedule_timeout (process_timeout) > 2.2% ( 0.1) <kernel core> : neigh_add_timer (neigh_timer_handler) > 1.6% ( 0.1) nmbd : schedule_timeout (process_timeout) > 1.1% ( 0.1) screen : do_setitimer (it_real_fn) > 0.5% ( 0.0) syslogd : do_setitimer (it_real_fn) > 0.5% ( 0.0) xfssyncd : schedule_timeout (process_timeout) > 0.5% ( 0.0) cron : do_nanosleep (hrtimer_wakeup) > 0.5% ( 0.0) <kernel core> : queue_delayed_work (delayed_work_timer_fn) It goes up by 3-5 wakeups-per-second per client that connect but returns to a value below 10 after the client (I used ncmpc and minion) disconnects. During Playback ofcourse it goes up way over 100 which probably depends on the type of file and bitrate. I didn't test that in detail. > Cn Avg residency P-states (frequencies) > C0 (cpu running) (32.6%) 750 Mhz 0.0% > polling 0.1ms ( 0.0%) 563 Mhz 0.0% > C1 halt 0.0ms ( 0.0%) 375 Mhz 0.0% > C2 0.1ms ( 0.0%) 188 Mhz 100.0% > C3 5.9ms (67.4%) > > Wakeups-from-idle per second : 114.5 interval: 15.0s > no ACPI power usage estimate available > > Top causes for wakeups: > 53.2% ( 80.3) mpd : schedule_timeout (process_timeout) > 31.1% ( 46.9) <interrupt> : uhci_hcd:usb1, ehci_hcd:usb5, HDA Intel > 4.7% ( 7.1) <interrupt> : uhci_hcd:usb3, eth0 > 1.9% ( 2.9) mpd : sk_reset_timer (tcp_write_timer) > 1.4% ( 2.1) <kernel core> : sk_reset_timer (tcp_delack_timer) > 1.3% ( 2.0) ncmpc : schedule_timeout (process_timeout) > 1.3% ( 2.0) ncmpc : sk_reset_timer (tcp_delack_timer) > 1.3% ( 1.9) ncmpc : sk_reset_timer (tcp_write_timer) > 0.7% ( 1.0) ifconfig : b44_open (b44_timer) > 0.7% ( 1.0) xfsaild : schedule_timeout (process_timeout) > 0.6% ( 0.9) xfsbufd : schedule_timeout (process_timeout) > 0.3% ( 0.5) <kernel core> : schedule_delayed_work_on > (delayed_work_timer_fn) > 0.2% ( 0.3) <kernel module> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 0.1% ( 0.2) <interrupt> : uhci_hcd:usb4, sata_sil24 > 0.1% ( 0.2) <kernel core> : __netdev_watchdog_up (dev_watchdog) > 0.1% ( 0.2) init : schedule_timeout (process_timeout) > 0.1% ( 0.2) runsvdir : schedule_timeout (process_timeout) > 0.1% ( 0.2) <kernel core> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 0.1% ( 0.1) <kernel core> : end_that_request_last (laptop_timer_fn) The strange behaviour is however that mpd keeps waking up the CPU very often even AFTER playback stops! Sometimes it goes down to 90 per second sometimes it goes up to 170 per second for a some 5 to 10 seconds and than returns to about 90. In any case the number of wakeups per seconds stays at a very high level even after all clients disconnect: > Cn Avg residency P-states (frequencies) > C0 (cpu running) ( 1.5%) 750 Mhz 0.0% > polling 0.0ms ( 0.0%) 563 Mhz 0.0% > C1 halt 0.0ms ( 0.0%) 375 Mhz 0.0% > C2 0.0ms ( 0.0%) 188 Mhz 100.0% > C3 11.4ms (98.5%) > > Wakeups-from-idle per second : 86.7 interval: 15.0s > no ACPI power usage estimate available > > Top causes for wakeups: > 97.2% (167.7) mpd : schedule_timeout (process_timeout) > 0.6% ( 1.0) ifconfig : b44_open (b44_timer) > 0.6% ( 1.0) xfsaild : schedule_timeout (process_timeout) > 0.5% ( 0.8) xfsbufd : schedule_timeout (process_timeout) > 0.3% ( 0.5) <kernel core> : schedule_delayed_work_on > (delayed_work_timer_fn) > 0.2% ( 0.3) <kernel module> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 0.1% ( 0.2) <kernel core> : __netdev_watchdog_up (dev_watchdog) > 0.1% ( 0.2) runsvdir : schedule_timeout (process_timeout) > 0.1% ( 0.2) <kernel core> : neigh_table_init_no_netlink > (neigh_periodic_timer) > 0.1% ( 0.2) init : schedule_timeout (process_timeout) > 0.1% ( 0.2) <kernel core> : neigh_add_timer (neigh_timer_handler) > 0.1% ( 0.1) nmbd : schedule_timeout (process_timeout) > 0.0% ( 0.1) screen : do_setitimer (it_real_fn) > 0.0% ( 0.1) xfssyncd : schedule_timeout (process_timeout) It seems like mpd does not completely return from "playback mode" to "idle mode". I have no clue about the inner structure of mpd so I can't even begin to guess if a thread is not killed, an input buffer can not be filled with the available input and therefore causes a short wait for more data, or an output buffer can't be flushed. The only way I've found to get mpd back into the idle mode is by restarting mpd. My config file is pretty boring: > $ grep -v "^#\|^$" /etc/mpd.conf > music_directory "/home/data/static/audio" > playlist_directory "/var/lib/mpd/playlists" > db_file "/var/lib/mpd/tag_cache" > log_file "/var/log/mpd/mpd.log" > error_file "/var/log/mpd/errors.log" > pid_file "/var/run/mpd/pid" > state_file "/var/lib/mpd/state" > user "mpd" > filesystem_charset "UTF-8" > id3v1_encoding "ISO-8859-1" There's nothing in the logs: > $ ls -lsa /var/log/mpd/* > 0 -rw------- 1 mpd audio 0 2009-01-01 19:22 /var/log/mpd/errors.log > 0 -rw------- 1 mpd audio 0 2009-01-01 19:22 /var/log/mpd/mpd.log Hardware is the builtin soundcard: > $ cat /proc/asound/cards > 0 [Intel ]: HDA-Intel - HDA Intel > HDA Intel at 0xdfebc000 irq 16 And mpd uses the alsa output: > # lsof | grep mpd | grep dev/snd > mpd 11195 mpd mem CHR 116,16 3821 > /dev/snd/pcmC0D0p > mpd 11195 mpd 4r CHR 116,33 3803 > /dev/snd/timer > mpd 11195 mpd 8u CHR 116,16 3821 > /dev/snd/pcmC0D0p > mpd 11195 mpd 9u CHR 116,0 3833 > /dev/snd/controlC0 Any clue what could be causing this? Is the observed behaviour consistent with any bug that has been fixed after 0.13.2 ? cheers -henrik PS: Please CC me as I am not on the mailing list. PPS: Unfortunately I didn't find an mpd 0.14 package for debian lenny and I didn't have time to build one yet. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team