Adding Ram After the Fact, Swap

mtxblau

Mid Boss
So, I'm planning to do a Linux and XP dual boot. I have 192MB of ram, but as soon as the ram comes in, it'll be up to 320MB (it's a laptop).

Back in the day, one was once required to recompile the kernel after installing more ram... I'm planning to install suse 10.0 w/ xfce, I imagine this won't be an issue, but has anyone noticed a difference in performance or extra work required once ram was installed?

Same goes for XP, though I've done this in the past but just want to confirm - no noticeable side effects for adding additional ram?

And finally, the swap issue.

I always, whether xp or linux, specify the swap size. Before I used the rule 1.5x times the ram, but lately I've been wondering - why would a computer with more ram need more swap space that a computer with less ram, if all other things were equal?

Am I the only one who thinks that's a false assessment?
 
I haven't used Suse. But with Knoppix, Ubuntu and VecotrLinux I never noticed any major let alone minor problems in putting more RAM in after the install...

(shit I've removed the HDD and placed it into completely different machines and didn't notice any problems. I have an install of ubuntu I've swapped between a P3 600mhz with 256MB of sdRAM and a P4 2.8Ghz with 1 Gig of ddrRAM... its originall install was to the slower machine.) But for BEST performance it is smart to have the kernel compiled for your exact system. A small change in RAM size probably won't cause any noticeable problems though.

as for the swap... I've heard the 1.5x thing as well. What I believe it has to do with is it is only going to swap upto the maximum of the RAM you have and it drops it randomly. If it is exactly the same size as the RAM it forces it to have to organize taking more time; on top of that RAM isn't as sector dependant like a HDD is, so small bits of data from RAM will take up more physical space on the HDD... If the swap is too big though the search time to pick up a sector of data may take to long.
 
Well, 320MB isn't much for Linux or XP these days, but that shouldn't be a problem... especially on the Linux side if you run xfce, flux or similar.

Recompiling the kernel for more RAM? Well there is a highmem-lowmem option, lowmem applies to something like 896M and under (not an exact number), whereas highmem is anything above that. Using the highmem option is supposed to create some overhead, but it shouldn't be a big factor. There's also a '1GB lowmem' option for people that have 1GB exactly in their machines-- it enables that amount without using the highmem option.

Other than that I don't know why you would need to recompile the kernel. Depending on the RAM amount you may have had to pass options to lilo/grub as well, but with 320MB that shouldn't be an issue.

Now as for swap size, the 1.5 thing is just a guideline, and honestly if you had 2GB of RAM I would say 3GB of swap would _definitely_ be overkill. Ultimately it comes down to the applications. I usually just create a 1GB swap partition on my Linux machine, which has 1GB of RAM. It rarely if ever gets more than 75% full, and I run a lot of applications simultaneously - usually having 20 or so firefox windows/tabs open, kmail, gaim, xchat, and others all running. So I guess you could say that 1GB is a waste on a 320MB machine, but keep in mind you may upgrade the RAM later and then you'll have to figure out a way to enlarge the swap partition if you've made it too small. (It's possible to use a swap file instead of a partition on Linux, but I really don't recommend it)

OTOH on my Windows box with the same amount of RAM, the swap tends to fill up a bit quicker, even though it's set to 1.5GB instead of just 1. I think this is due to two factors - for one, it's my opinion that Windows tends to swap a lot more in the first place (boot XP and look at how much swap is allocated right off the bat), and secondly, on my Windows machine I'm almost always running games or graphics apps, which understandably are pretty memory hungry. Running the same apps on a Linux machine (if they existed), I think 1GB swap would still be fine, but probably not less.

Also keep in mind that Photoshop has its own swap file, so if you're a PS user that's something you don't have to worry about when considering swap size.

edit - to lordofduct - you're right about compiling the kernel with optimizations for your specific processor/architecture, but amount of memory should make no difference at all other than the highmem/lowmem option I mentioned above.
 
Compiling the kernel was back in the 1.x, and even up to 2.2 kernel days. At least, that's what I ran into running redhat. But it was so long ago that it quite frankly escapes me how to do all these things.

Sadly, the laptop is limited to 320MB, hence xfce. My work is mundane and I rarely have more than 5-6 apps open, and usually I use the gimp by itself or with another program - never all at once.

That being said, I'm looking at a simple 750MB swap, both linux and xp. With XP I'm going to use xplite, and strip that as much as humanly possible; I've read that it significantly reduces the overhead but I guess only experimentation will provide real results.

I guess there's some truth in 1.5x - that is, computers with more ram probably are doing more things, hence need a bigger swap. Clearly, no one is expecting to run 20 apps on my laptop. :-D
 
True, but if you have 4GB of RAM there is really no point in having 6GB of swap. That's why more RAM is good in the first place. ;)
 
Back
Top