You are not logged in.

#1 2011-02-12 07:47:27

Tripsun
Member
Registered: 2011-01-22
Posts: 27

Swap

Hello everyone,

I have a couple of different questions that I would be very grateful if people could assist me with:

1) I am having difficulties getting hibernate and suspend to work (I know these are quite unpredictable areas in Linux). For suspend, I have set my swap partition = 4 GB (I have 6 GB of RAM).  Is this enough?  I heard that the 2xRAM rule only applies up to 1 gb of ram and that over 4 gb is overkill.

2) As expected, fsck runs a check on every partition every so many mounts.  The last two times that it has checked my /tmp partition (dev/sda7) it has told me something like: "lost+found not found - CREATED"
Is this an issue that I should worry about?  Are files being corrupted or destroyed (I am using ext3)

3)The same filesystem check reported that my /home partition was 14.5% non-contiguous.  I was not aware that I needed to defrag ext3.  I believe this is slightly up from the last check ~30 mounts ago (I think it was ~8%).  Is this anything I should worry about or will it fix itself?

Thanks a lot!

Last edited by Tripsun (2011-02-12 07:56:42)

Offline

#2 2011-02-12 10:21:20

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Swap

Your amount of swap should be okay for hibernation.

It's a somewhat strange idea to have a separate partition for /tmp. ext* filesystems like to have the lost+found directory to put corrupted files found with fsck there. Arch shutdown scripts remove everything from /tmp.

All filesystems fragment. Fragmentation degrades performance, although the degradation might not be very noticeable. ext4 should fragment less than ext3. Some filesystems have in-built defragmenting utilities, for others you can use programs like shake. Or you can just tar your the contents of your root partition, boot from a live cd, create a fresh filesystem and untar onto it.

Offline

#3 2011-02-12 10:26:00

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: Swap

1) It is enaugh if you don't use more than 4 GB RAM before hibernating. smile
But nothing will break, if swap is too little. It will try to hibernate and then return to the desktop leaving a message in the logs.
If you use a tuxonice patched kernel and tuxonice the RAM snapshot gets LZO compressed per default, I don't know if pm-utils does this too.

For word clarification:
Suspend = Suspend to RAM = no swap needed and PC goes into "Standby".
Hibernate = Suspend to disk = RAM gets written into swap and PC powers off.

2) You should create a new thread for different questions as only users familiar with the topic "swap" will look into here. smile
lost+found is a folder that ext3 and possible other filesystems always have. fsck will put files that were lost and during fsck found in there. It should always be empty but when something is in it, then you know that something was lost.

3) Fragmentation is not necessarily bad for performance. If you're interested try googling a bit around and find such articles:
http://geekblog.oneandoneis2.org/index. … ragmenting
On the other hand if your filesystem is always near-full  the fragmentation algorithm won't have much choice with big files than to fragment them badly.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

Board footer

Powered by FluxBB