Clear the computer's memory?

Vincent Trouilliez vincent.trouilliez at modulonet.fr
Thu Mar 30 11:01:26 UTC 2006


On Thu, 2006-03-30 at 10:53 +0100, Tony Arnold wrote:
> > It will not reload from swap simply because memory is free, it will
> > reload when the applications/prosseses are actively accessing that memory.
> 
> Which is what I was trying to say! 

Oops, sorry for misunderstanding you... being a Frog, I will try and
hide behind our reputation of being kinda disabled as far as languages
go... ;-)


> And again, it Linux's paging system that causes the return to memory.

Okay okay, I understand (I think ! ;-).
So basically, Linux uses the standard swap mechanism to resume, hence
the sluggishness. Okay makes sense. 
The problem is that I assumed that there was actually a specific/purpose
designed mechanism involved in the resuming phase, and that if the swap
partition was used, it had nothing to do with swapping, but rather that
it was the only partition that the system could safely use without
risking to overwrite system or user files.
So in my mind, the resume process could as well use any partition as
long as it had enough space left to dump the RAM contents in it. 
My assumption was wrong then....

Please, tell me that this time I got it right ?! ;o)

That being said, hopefully the mechanism will be improve/sophisticated,
to overcome this problem. Maybe do something like my original
assumption: use any partition with enough space, dump the contents of
the RAM, and reload it back into RAM in the exact same state that it was
before hibernating. Basically, kind of making a binary snapshot of the
RAM, put it to disk (swap partition or anywhere else), then copy that
"image" back into RAM. A bit like cloning a hard disk with 'dd' ;-)
This way, the system will be restored 100% like it was, hence if the
system was responsive before hibernating, it will be as responsive after
the resume. And if no swap was used before, not swap will be used after.
Should speed up the resume phase as well, since I usually have only
200MB of RAM used, which tales only 4 or 5 seconds to read from a hard
disk.

Well, something like that... :-)


--
Vince, day dreaming...





More information about the ubuntu-users mailing list