Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
whats keeping my hard drive awake?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
illerd
n00b
n00b


Joined: 21 Aug 2004
Posts: 8

PostPosted: Wed Sep 15, 2004 3:50 am    Post subject: whats keeping my hard drive awake? Reply with quote

Hi. I'm using cpudyn to keep things lo-pro while my computer is idle (which it is a lot). One of the 2 things this does is spin down the disks after a period of innactivity. I gather the same thing can be accomplished with hdparm, but I figured since I'm running cpudyn anyways may as well not fidget with hdparm init scripts. I've got 2 disks, one for gentoo and one for xp. Neither os mounts the other one's disk, so when I'm in gentoo, hda (xp) sleeps and stays asleep til I boot to windows or poke it with hdparm.

So I know that something (either cpudyn or the default power management settings) is doing its job on hda. hdb (gentoo) on the other hand will go to sleep if I hit it with hdparm -y, but it wakes up again after about a minute. It never sleeps if I just leave it alone. So I figure I've got a process that's keeping it active. What could it be? I'm very bare bones and have no loggers or cron daemons. Here's my ps aux :

Code:

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.1  0.0  2364  520 ?        S    19:45   0:03 init [3] 
root         2  0.0  0.0     0    0 ?        SN   19:45   0:00 [ksoftirqd/0]
root         3  0.0  0.0     0    0 ?        S<   19:45   0:00 [events/0]
root         4  0.0  0.0     0    0 ?        S<   19:45   0:00 [khelper]
root         5  0.0  0.0     0    0 ?        S<   19:45   0:00 [kacpid]
root        25  0.0  0.0     0    0 ?        S<   19:45   0:02 [kblockd/0]
root        26  0.0  0.0     0    0 ?        S    19:45   0:00 [khubd]
root        43  0.0  0.0     0    0 ?        S<   19:45   0:00 [aio/0]
root        42  0.1  0.0     0    0 ?        S    19:45   0:04 [kswapd0]
root        48  0.0  0.0     0    0 ?        S    19:45   0:00 [kseriod]
root       189  0.1  0.0     0    0 ?        S<   19:45   0:06 [reiserfs/0]
root       319  0.0  0.1  7824 1116 ?        Ss   19:45   0:00 /sbin/devfsd /dev
root      5450  0.2  0.0  2364  480 ?        S<s  19:45   0:08 /usr/sbin/cpudynd -i 1 -p 0.4 0.75 -l 7 -t 120 -h /dev/hda,/dev/hdb
root      5651  0.0  0.0  5484  672 ?        Ss   19:45   0:00 /sbin/dhcpcd -HD eth0
rpc       5819  0.0  0.0  6508  656 ?        Ss   19:45   0:00 /sbin/portmap
nobody    5848  0.0  0.0  7584  840 ?        Ss   19:45   0:00 /sbin/rpc.statd
root      5856  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5857  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5858  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5864  0.0  0.0     0    0 ?        S    19:45   0:00 [lockd]
root      5865  0.0  0.0     0    0 ?        S    19:45   0:00 [rpciod]
root      5859  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5860  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5861  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5862  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5863  0.0  0.0     0    0 ?        S    19:45   0:00 [nfsd]
root      5868  0.0  0.0  5560  736 ?        Ss   19:45   0:00 /usr/sbin/rpc.mountd
root      6003  0.0  0.1 16624 1724 ?        Ss   19:45   0:00 /usr/sbin/sshd
root      6139  0.0  0.0  5472  692 tty1     Ss+  19:45   0:00 /sbin/agetty 38400 tty1 linux
root      6140  0.0  0.0  5472  692 tty2     Ss+  19:45   0:00 /sbin/agetty 38400 tty2 linux
root      6141  0.0  0.0  5472  692 tty3     Ss+  19:45   0:00 /sbin/agetty 38400 tty3 linux
root      6142  0.0  0.0  5472  692 tty4     Ss+  19:45   0:00 /sbin/agetty 38400 tty4 linux
root      6143  0.0  0.0  5472  692 tty5     Ss+  19:45   0:00 /sbin/agetty 38400 tty5 linux
root      6144  0.0  0.0  5472  692 tty6     Ss+  19:45   0:00 /sbin/agetty 38400 tty6 linux
root      6171  0.0  0.0  9700  772 ?        Ss   19:45   0:00 /usr/kde/3.3/bin/kdm
root      6174  1.2  2.7 175944 28140 ?      SL   19:45   0:44 /usr/X11R6/bin/X -nolisten tcp -auth /var/run/xauth/A:0-X0BRTa vt7
root      6175  0.0  0.1 26808 1720 ?        S    19:45   0:00 -:0                 
sdillard  6258  0.0  0.1  4500 1040 ?        S    19:47   0:00 /bin/sh --login /usr/kde/3.3/bin/startkde
sdillard  6298  0.0  1.4 66848 14484 ?       Ss   19:47   0:00 kdeinit: Running...     
sdillard  6301  0.0  1.2 64540 13232 ?       S    19:47   0:00 kdeinit: dcopserver --nosid
sdillard  6303  0.0  1.4 67204 14748 ?       S    19:47   0:00 kdeinit: klauncher       
sdillard  6306  0.0  1.9 85572 19648 ?       S    19:47   0:00 kdeinit: kded           
sdillard  6315  1.0  1.7 106788 17628 ?      S    19:47   0:35 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard  6317  0.0  2.1 95200 21928 ?       S    19:47   0:00 kdeinit: knotify         
sdillard  6513  0.0  0.0  2348  348 ?        S    19:47   0:00 kwrapper ksmserver
sdillard  6515  0.0  1.5 74760 16352 ?       S    19:47   0:00 kdeinit: ksmserver       
sdillard  6516  0.0  1.8 78608 18916 ?       S    19:47   0:03 kdeinit: kwin -session 1070d922eb000109308632600000060790000_1095216169_275839
sdillard  6517  0.0  1.7 106788 17628 ?      S    19:47   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard  6520  0.0  1.9 79180 20204 ?       S    19:47   0:02 kdeinit: kdesktop       
sdillard  6522  0.1  2.1 89952 22212 ?       S    19:47   0:04 kdeinit: kicker         
sdillard  6537  0.0  1.7 76012 18344 ?       S    19:47   0:00 kdeinit: klipper         
sdillard  6569  0.0  1.9 79680 19988 ?       S    19:47   0:00 kdeinit: kmix -session 1070d922eb000109308663800000060790014_1095216162_988656
sdillard  6654  0.0  1.8 76556 18756 ?       S    19:47   0:00 kdeinit: kio_uiserver   
sdillard 11285  0.5  3.4 114552 35748 ?      R    20:06   0:12 kdeinit: konqueror --silent
sdillard 12915  0.0  1.7 106788 17628 ?      S    20:20   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard 12916  0.0  1.7 106788 17628 ?      S    20:20   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard 12917  0.0  1.7 106788 17628 ?      S    20:20   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard 12918  0.0  1.7 106788 17628 ?      S    20:20   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard 13158  0.1  2.6 93292 27564 ?       S    20:22   0:02 kdeinit: konqueror --silent
sdillard 15149  0.0  1.7 106788 17628 ?      S    20:29   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
sdillard 15654  0.0  0.9 13204 10040 ?       S    20:30   0:00 ispell -a -S -C
sdillard 18059  0.0  1.7 106788 17628 ?      S    20:40   0:00 //usr/kde/3.3/bin/artsd -F 10 -S 4096 -b 16 -s 60 -m artsmessage -c drkonqi -l 3 -f
root     18104  0.0  0.0     0    0 ?        S    20:40   0:00 [pdflush]
root     18308  0.0  0.0     0    0 ?        S    20:41   0:00 [pdflush]
sdillard 18539  0.0  1.4 72892 15268 ?       S    20:42   0:00 kdeinit: kio_file file /tmp/ksocket-sdillard/klauncherzDzKCa.slave-socket /tmp/ksocket-sdillard/konquerorWF5xqa.slave-socket
sdillard 18591  1.8  1.9 81556 20076 ?       R    20:43   0:00 kdeinit: konsole         
sdillard 18592  0.0  0.1  8656 1456 pts/12   Ss   20:43   0:00 bash -l
sdillard 18601  0.0  0.0  8464  888 pts/12   R+   20:43   0:00 ps aux


most of that stuff is kde related. Other notable jobs are nfsd and sshd and X. Thats about it. Like I said, there's no loggers or cron daemons to poke the hd, so what could be accessing it? KDE seems like a likely suspect. Anyone familiar enough with the KDE system to know what could be accessing the HD so regularly and how to stop it?

Scott
Back to top
View user's profile Send private message
uncleben
n00b
n00b


Joined: 21 May 2004
Posts: 23

PostPosted: Wed Jan 05, 2005 8:50 pm    Post subject: Reply with quote

same for me.. i want to use this on a small server in my room, and turning the hdd off would make it a lot more quiet

my ps ux:

root 1 0.0 0.2 1248 448 ? S 13:59 0:00 init [3]
root 2 0.0 0.0 0 0 ? SN 13:59 0:00 [ksoftirqd/0]
root 3 0.0 0.0 0 0 ? S< 13:59 0:00 [events/0]
root 4 0.0 0.0 0 0 ? S< 13:59 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< 13:59 0:00 [kacpid]
root 31 0.0 0.0 0 0 ? S< 13:59 0:00 [kblockd/0]
root 32 0.0 0.0 0 0 ? S 13:59 0:00 [khubd]
root 43 0.0 0.0 0 0 ? S 13:59 0:00 [pdflush]
root 44 0.0 0.0 0 0 ? S 13:59 0:01 [pdflush]
root 46 0.0 0.0 0 0 ? S< 13:59 0:00 [aio/0]
root 45 0.0 0.0 0 0 ? S 13:59 0:00 [kswapd0]
root 636 0.0 0.0 0 0 ? S 13:59 0:00 [kseriod]
root 658 0.0 0.0 0 0 ? S< 13:59 0:00 [ata/0]
root 679 0.0 0.0 0 0 ? S< 13:59 0:00 [reiserfs/0]
root 808 0.0 0.4 1588 840 ? Ss 13:59 0:00 /sbin/devfsd /dev
root 5927 0.0 0.7 3904 1396 ? Ss 14:00 0:00 /usr/sbin/sshd
root 5942 0.0 0.2 1292 552 tty1 Ss+ 14:00 0:00 /sbin/agetty 3840
root 5943 0.0 0.2 1292 552 tty2 Ss+ 14:00 0:00 /sbin/agetty 3840
root 5944 0.0 0.2 1292 552 tty3 Ss+ 14:00 0:00 /sbin/agetty 3840
root 5945 0.0 0.2 1292 552 tty4 Ss+ 14:00 0:00 /sbin/agetty 3840
root 5946 0.0 0.2 1292 552 tty5 Ss+ 14:00 0:00 /sbin/agetty 3840
root 5947 0.0 0.2 1292 552 tty6 Ss+ 14:00 0:00 /sbin/agetty 3840
root 6266 0.0 1.0 6004 1964 ? Ss 14:12 0:00 /usr/sbin/smbd -D
root 6269 0.0 1.0 6004 1952 ? S 14:12 0:00 /usr/sbin/smbd -D
root 6270 0.0 0.7 3224 1340 ? Ss 14:12 0:00 /usr/sbin/nmbd -D
root 30858 0.1 0.9 4180 1908 ? S 14:47 0:01 /usr/sbin/sshd
root 30886 0.0 0.4 1916 896 pts/0 S 14:49 0:00 su
root 30887 0.0 0.6 1944 1164 pts/0 S 14:49 0:00 bash
root 30974 0.0 0.4 2204 772 pts/0 R+ 15:05 0:00 ps ux
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Wed Jan 05, 2005 9:57 pm    Post subject: Reply with quote

* If you are near your physical RAM limit, swapping to disk will occur

* Even if you aren't, Linux likes to keep RAM free for responsiveness. You can tune this behavior with the "laptop_mode" and "swappiness" switches in /proc/sys/vm

How I do it on my laptop, to save power while on battery:

Code:
echo 1 > /proc/sys/vm/laptop_mode
echo 20 > /proc/sys/vm/swappiness
hdparm -S1 -B1 -a16484 /dev/hda


I then reverse with the following:

Code:
echo 0 > /proc/sys/vm/laptop_mode
echo 60 > /proc/sys/vm/swappiness
hdparm -S0 -B235 -a256 /dev/hda


Please check the hdparm switches for yourself! Good luck :)
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
dtor
Guru
Guru


Joined: 19 Jan 2004
Posts: 461
Location: Indiana, USA

PostPosted: Wed Jan 05, 2005 10:52 pm    Post subject: Reply with quote

Journalling filesystems (ext3 =, reiserfs, etc) regularly dump journal ocntents to disk (5 sec for ext3 I think).
_________________
Dmitry
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Wed Jan 05, 2005 11:01 pm    Post subject: Reply with quote

dtor wrote:
Journalling filesystems (ext3 =, reiserfs, etc) regularly dump journal ocntents to disk (5 sec for ext3 I think).

laptop_mode handles this
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
maxpayne
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 122

PostPosted: Sun Jan 09, 2005 5:20 pm    Post subject: no swappiness!? Reply with quote

Code:

bash-2.05b# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.tcp_ecn = 0
net.ipv4.conf.default.rp_filter = 1
error: 'vm.swappiness' is an unknown key
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Sun Jan 09, 2005 7:43 pm    Post subject: Re: no swappiness!? Reply with quote

maxpayne wrote:
Code:

bash-2.05b# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.tcp_ecn = 0
net.ipv4.conf.default.rp_filter = 1
error: 'vm.swappiness' is an unknown key

Code:
bash# sysctl -a

tells you what's avaliable. I have "vm.swappiness" with kernel 2.6.7.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
maxpayne
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 122

PostPosted: Wed Jan 12, 2005 10:35 am    Post subject: Reply with quote

@ Hypnos:

hmm, i think i read somewhere that the later 2.6 kernels have something like an auto-swappiness inside the kernel which replaces the manual one and thus is not available anymore... not sure tho
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum