2

I've got a laptop with two disks - 1TB HDD and 256 SSD, and 12GB RAM and I want to install debian on SSD.
I used hibernation a lot in Windows, I find it very comfortable and would like to use it still. I know it is not the best idea to use SSD for hibernation purposes. On the other hand, for system performace it would be better to have swap partition on SSD, wouldn't it?
I've been wondering what would be the best solution for optimal performance of the system. As for now I am considering two options:

  1. 16GB swap partition on HDD for purely hibernation purposes - enabling hibernation and setting swapiness to 1 (don't want my system to slow down by HDD swap operations)

  2. 4GB swap partition (just in case) on SSD. No hibernation but enabled session restore. If so, is there a session manager that could restore a session (almost) like it was just resumed after hibernation (State of the applications, position of the windows, etc.).

Would there be any noticeable difference in performance of the system? Is there a better solution? Maybe: 2 swap partitions - the first one for hibernation (on HDD) and the second one for the system needs (on SSD)?

1

In most cases you shouldn't touch the swappiness setting; the kernel will do the right thing by default (even if that means swapping more). The kernel will typically use idle time to speculatively swap out some pages it thinks it might be able to free later, so that when memory pressure arises it can free physical memory quickly. I don't think you'd notice a performance hit.

As for suspend to disk vs. swap: it's certainly preferable to swap to the SSD because of the lower seek times, but suspend to disk is single-threaded linear I/O, so using the SSD for that doesn't help much (but takes up a lot of precious SSD space).

I'd recommend creating two swap partitions: a small one on the SSD and a larger one, with lower priority, on the HDD, then use the one on the HDD for hibernation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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