Skywalker wrote:Both empty_exim and sleep are pre-fetched into memory just before spinning down, so they should have no reason to read from disk. Maybe it's one of the shared libraries that sleep uses...? This updated addon will prefetch the shared libraries too. Can you try it?
I'm sorry to be the bearer of bad news: I've tried the new version of the add-on, but alas, I'm still seeing random spinups (zero for three). It actually doesn't seem to want to spin down at all for more than a second or three with the new version of the add-on, which is somewhat worse than the previous version of the add-on.
In the first case, it didn't get to fully spin down. I wonder what noflushd was reading that seems to have caused the problem? (See the line immediately before "Spindown of /dev/hdc cancelled.")
- Code: Select all
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 3936176 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 3936184 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 3916640 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 3919112 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 778280 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 775936 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 778424 on hdc1
Oct 16 21:13:23 nas kernel: noflushd(835): READ block 778240 on hdc1
Oct 16 21:13:24 nas noflushd[835]: Spinning down /dev/hdc.
Oct 16 21:13:24 nas kernel: noflushd(835): WRITE block 8 on hdc1
Oct 16 21:13:24 nas kernel: noflushd(835): WRITE block 1310736 on hdc1
Oct 16 21:13:24 nas kernel: noflushd(835): WRITE block 1523624 on hdc1
Oct 16 21:13:24 nas kernel: noflushd(835): WRITE block 1523800 on hdc1
Oct 16 21:13:24 nas kernel: noflushd(835): WRITE block 1523888 on hdc1
Oct 16 21:13:24 nas kernel: syslogd(869): dirtied inode 80818 (daemon.log) on hdc1
Oct 16 21:13:24 nas last message repeated 2 times
Oct 16 21:13:24 nas kernel: noflushd(835): READ block 786488 on hdc1
Oct 16 21:13:24 nas noflushd[835]: Spindown of /dev/hdc cancelled.
Oct 16 21:13:29 nas kernel: pdflush(1411): WRITE block 1526376 on hdc1
Oct 16 21:13:29 nas kernel: pdflush(1411): WRITE block 1526416 on hdc1
Oct 16 21:13:29 nas kernel: pdflush(1411): dirtied inode 80806 (debug) on hdc1
Case #2:
- Code: Select all
Oct 16 21:18:28 nas kernel: sh(1477): dirtied inode 80841 (?) on hdc1
Oct 16 21:18:28 nas kernel: sh(1477): dirtied inode 80638 (frontview) on hdc1
Oct 16 21:18:28 nas kernel: sh(1477): dirtied inode 80638 (frontview) on hdc1
Oct 16 21:18:28 nas kernel: sh(1480): dirtied inode 80841 (?) on hdc1
Oct 16 21:18:30 nas noflushd[835]: Spinning down /dev/hdc.
Oct 16 21:18:30 nas kernel: syslogd(869): dirtied inode 80818 (daemon.log) on hdc1
Oct 16 21:18:30 nas last message repeated 2 times
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 8 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1310736 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1310744 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1310936 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1310952 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1310960 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1523624 on hdc1
Oct 16 21:18:30 nas kernel: noflushd(835): WRITE block 1523800 on hdc1
Oct 16 21:18:32 nas noflushd[835]: Spinning down /dev/hde.
Oct 16 21:18:32 nas kernel: sh(1481): READ block 4031672 on hdc1
Oct 16 21:18:37 nas kernel: noflushd(835): dirtied inode 1484 (spindown) on ramfs
Oct 16 21:18:37 nas kernel: noflushd(835): dirtied inode 4026532439 (set_pwm) on proc
Oct 16 21:18:42 nas noflushd[835]: Spinning up /dev/hdc after 0 minutes.
Oct 16 21:18:42 nas noflushd[835]: Spinning up /dev/hde after 0 minutes.
Oct 16 21:18:42 nas kernel: noflushd(835): dirtied inode 4026532439 (set_pwm) on proc
Oct 16 21:18:47 nas kernel: noflushd(835): dirtied inode 4026532439 (set_pwm) on proc
The third one, which I won't bother to copy and paste, involved sh and mdconfig.
On a side note, is there an easy way to translate a block number into a path or filename? I haven't looked at Linux filesystems implementations in a while, but it seems like that might help.
Skywalker wrote: Yours seems like a strange case though, because with my Duo here, once it spins down, it will stay down for up to a week.
I have noticed some interesting behavior in this regard:
The previous system state seems to have something to do with whether or not it wants to spin down. I have two Macs on the network running 10.5.5. I don't know if there is a 100% correlation, but it seems that if I use either of the Macs to do a time machine backup to the NAS, I experience spindown problems afterward. If the NAS comes up with a fresh boot and I don't try to do any Time Machine backups, it seems like there is less of a problem.
I haven't done any testing to verify that this is a causal relationship or not: I have certainly seen days when the drive is spun down for most of the time, and I've seen days when it goes up and down more often than a toilet seat in a coed dorm. I am also unsure if it's related to Time Machine specifically, or perhaps general AFP access, or even something else (Bonjour and so on).
My previous testing with tcpdump showed that the other systems were not sending any significant traffic to the NAS device after the backups had completed, so I would suspect that this is not a case of the clients provoking the server (for which I'd expect to see afpd involved in the above logs anyway).
In other words, treat this Time Machine as "something I've noticed" that might warrant further investigation if you're trying to reproduce it...although it could still be a red herring.
