Linux – Keeping disk caches when hibernating

cachediskhibernatelinux

Is there a way to keep disk caches when hibernating Linux? I understand and agree that dropping them is the best option all-around. But my system is unresponsive after resume and I would like to give a try to keeping that data.

Of course, both hibernating and resuming will be slower, since disk cache data will have to be written to swap and restored. And, of course, I will need more swap space than I do now. But still, I've been looking all over the web and I haven't found any way to set things up like that.

I use pm-utils with uswsusp as backend, but I'm open to suggestions.

Best Answer

I know your pain, after hibernation my computer is much slower.

But there is another way. It's called TuxOnIce.

It is much faster than the in-kernel hibernation and it is able to save ALL the memory in use, including the disk caches. It makes a massive difference and actually makes hibernation in Linux usable on a day to day basis.

Beware - it does involve building your own kernel. If you're a Debian or Ubuntu user, this is fairly easy using kernel-package (make-kpkg). Good luck!