My current laptop has 2GB of RAM, and I have to do hibernation (suspend to disk) a lot, since I use it in and between classes, and suspend to ram doesn't work (no Linux support yet for this machine :(). So I am wondering, if Linux copies everything in RAM (including unused space and disk cache) to disk or just the application data?

I have a SSD so wake ups are not THAT slow, but are still quite slow compared to waking up from RAM, and would like to make it faster. Will removing 1GB of RAM help? Since I don't need more than 1GB of RAM anyways.

09-12-2009

abachler

Susend to ram just declocks the processor and powers down other devices, it doesnt go into full hibernation. You only need as much ram as you have, since it doesnt make a copy of that ram in ram.

So I am wondering, if Linux copies everything in RAM ... to RAM or just the application data?

Make up your mind.

Quote:

Originally Posted by Wikipedia

Hibernate is a feature of many computer operating systems where the contents of RAM are written to non-volatile storage such as a hard disk, as a file or on a separate partition, before powering off the computer.

Windows 95 supported hibernation through hardware manufacturer-supplied drivers and only if compatible hardware and BIOS were present. Since Windows 95 supported only Advanced Power Management (APM), hibernation was then known as Suspend-to-Disk.

Perhaps you are confusing hibernate with low power mode, which just shuts down the hard drive monitor and declocks the processor, but does not suspend to disk.

09-12-2009

cyberfish

Ah sorry. A typo. Fixed. I was referring to hibernating to disk (no power mode).

09-12-2009

abachler

Quote:

Originally Posted by cyberfish

Ah sorry. A typo. Fixed. I was referring to hibernating to disk (no power mode).

It saves everything in ram, including global and local descriptor tables, thread context information, registers, the entire machine state including virtual memory and all application data that resides in memory, physical or virtual.

I do not know if it saves the cache (L1L2L3) btu I doubt it as there is no trivial way to directly access teh cache and whether a memory location is in the cache or not does not effect its logical operation. It does however flush the cache.

It also saves peripheral device states for ACPI compliant devices.

09-12-2009

cyberfish

I see. So not unused memory? That means removing 1 stick of memory won't help (make it faster)?

09-13-2009

Elysia

I know that usually more memory equals longer hibernation times.
I guess that this might have something to do with that it has more data to dump from memory. If you lesser RAM, then the rest of the data would already be saved in the pagefile.
To try this out, you can, for example, hibernate when you've just booted your system against, for example, when you run a game. The latter should take longer.