Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I noticed one of our CentOS machines was very close to 100% memory usage last night. The load average on the machine shot up to ~16 and I noticed that there were several pdflush processes that were blocked on Disk IO (run state D in top). I thought pdflush was used to swap data from memory to disk (os memory paging), but that particular server didn't have a swap partition mounted. So what was pdflush actually doing in this case?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

pdflush's primary duty is flushing the disk buffer cache (AFAIk this is its only duty, but a Linux guru may correct me on this). The cache it flushes includes files that have been written to but not yet committed to disk.
If I recall correctly kswapd is the virtual process responsible for dealing with swap space & shuffling memory pages from RAM to disk & back again.


For the health of your system, please set up a swap partition for your server (or swapon the one you have)

Unix-like systems expect to be able to swap. Bad Things can happen when there is no available swap (like the disk buffer cache getting squeezed down to a tiny bit of memory, which can really make pdflush have a bad day).
Even if you'll "never" use the swap space, disk is cheap enough that you can throw 2G at it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.