Hello.
For a laptop with 4gb of ram, how much space should give the swap?. The disk is 500gb.
The order of the partitions should be: / /swap /home or better / /home /swap??
Thank you.
Hello.
For a laptop with 4gb of ram, how much space should give the swap?. The disk is 500gb.
The order of the partitions should be: / /swap /home or better / /home /swap??
Thank you.
8-Gib is plenty (double your RAM), although the (conflicting) information I have suggests from 4 (the most seemingly authoritative source) and others suggest more.
You will also probably get a lot of conflicting answers here, as well.
But, 8 should be plenty.
I would allocate 8gb to swap, although I would likely never use close to that much. The installer might only allocate 4gb, if you allow it to pick. How much you actually need depends on how you use the computer.
It is just “swap”, not “/swap”. You will never see it as part of the file system, but the “free” command will tell you how much swap is in use.
The order of the partitions is not very important. If swap is rarely used, then put it at the end. If it is heavily used then put it in the middle.
On 04/23/2014 06:46 PM, Fraser Bell wrote:
>
> jony127;2638794 Wrote:
>> Hello.
>>
>> For a laptop with 4gb of ram, how much space should give the swap?. The
>> disk is 500gb.
>>
>> The order of the partitions should be: / /swap /home or better /
>> /home /swap??
>>
>> Thank you.
>
> 8-Gib is plenty (double your RAM), although the (conflicting)
> information I have suggests from 4 (the most seemingly authoritative
> source) and others suggest more.
>
> You will also probably get a lot of conflicting answers here, as well.
>
> But, 8 should be plenty.
For me, 2 * RAM is the correct number if you have little RAM, i.e. much less
than 4 GB because you can expect to get some swapping on occasion. As the RAM
size gets larger, you can decrease the factor; however, if you plan to use
hibernation, the swap space needs to be large enough to hold the compressed copy
of the image of RAM. As the typical compression ratio is 2, swap should be at
least 0.5 * RAM.
My laptop has 3 GB RAM, and a 4 GB swap partition. Yes, 8 should be plenty.
On 2014-04-24 01:06, jony127 wrote:
>
> Hello.
>
> For a laptop with 4gb of ram, how much space should give the swap?.
A: As much as you need.
Q: How much do I need?
A: What applications do you run simultaneously, and how much memory do
they want/need?
Q: Er… ?
So… half a gigabyte may be enough for some things. Two for more
things. Four for even more things. Eight for way more things. Sixteen
for… Do you want to set up a hundred gigabytes? Just do it. No
kidding, do it. Of course, if you actually need that much, your machine
will be overtaken by scribes carving stones with chisels!
Ok, minimal swap for hibernation is as as much /free/ swap as used RAM.
So if your machine while in use has 2 GiB in swap, you need 6 to be /safe/.
I would simply go for a figure between 8 and 12.
> The order of the partitions should be: / /swap /home or better /
> /home /swap??
Throw a dice. Seriously.
Ok, you do not believe me? Ok… Then divide your disk in a number of
partitions, say 25, and measure the speed in each of them using “hdparm
-tT”. Tabulate the results and compare them.
You will probably find that the fastest region is not the inner rim, nor
the outer rim, but perhaps about 1/3 of the way. Whatever that “way” is,
because with LBA it is really impossible to know the actual disk geometry.
I have done, years ago, the test I propose and that’s what I found out,
for the disks I was using. Other brands and models might behave differently.
Once you measured the disk speed, you can choose where to place your
partitions with knowledge, not guesses. Not even our guesses.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
… and, rethinking this myself, although I still suggest a swap of 8 for RAM of 4, I also thought that you might want to consider how much RAM your computer can be upgraded to. If it tops out at 4, I would probably just stay at 8, but if it tops out at more, say 8 or 16, then I would make it at least a minimum of your maximum RAM, in case you decide to upgrade in the future.
> The order of the partitions should be: / /swap /home or better /
> /home /swap??
You will probably find that the fastest region is not the inner rim, nor
the outer rim, but perhaps about 1/3 of the way. Whatever that “way” is,
because with LBA it is really impossible to know the actual disk geometry.
I think this is a fairly safe bet that Carlos is proposing.
It once was a fact that the fastest access and read/writes were at the front of the disk, but that was actually a long, long time ago on older systems. With the advances in electronics and disk media, surfaces on the platters, and so on in the past couple of decades, if there is a difference anywhere, you probably will likely never notice it.
However, I am going to propose you put the swap at the END of the drive, and for a reason similar to my above RAM statement.
If you ever wish to resize it, then all you will need to do is shrink the partition just before it by the same amount. For that reason, I would make the second-to-last partition the /home partition, as it is less disruptive to resize than the / (root) partition. Or, it could be an extra DATA partition, if you tend to use one (I do, makes things a lot simpler to work with, especially for backing up or sharing.).
Keep us posted, as we are interested.