eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sat Jun 11, 2022 1:38 am Post subject: disk wait "D" state = not idle? |
|
|
I was watching my PC as it rsynced from RAID5 on one machine to a single disk on another. Slow mechanical disks, mind you. Anyway as I was running 'top' I noticed that processors' idle time was not near 100% as surely the machine was starving for data trying to read from slow hard disks. This time was accounted for in the 'Wait' column which indeed it was waiting for the disks.
But shouldn't the processes be sleeping while it waits, and an interrupt will occur when Linux finally is able to return the requested data?
Almost seems like the processes are polling for the disk to come back with data. While I wasn't running anything at the time, it seems that while the rsync process was waiting for data to come back from the disks, another process could preempt and do computation, and well, processes in wait should not be subtracting from idle time (of which the processor could be sleeping?)
Not sure if I'm reading 'top' correctly either. But seemed a bit odd or perhaps I'm missing something here. Perhaps it truly is spin loop waiting for data, maybe it's cheap network cards? Hmm... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|