swap space as memory?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
artie
Level 1
Level 1
Posts: 24
Joined: Thu Oct 18, 2007 12:32 pm

swap space as memory?

Post by artie »

Hi Everybody!

I have an old laptop (P3 128mb ram) that is running Mint 4.0 with no problems at all.

Is there a way to use swap space (via a usb stick or expanding the swap partition) to

allocate more memory to the overall system and make it run a little bit faster. This

particular laptop will not handle anything over 128mb of ram but it runs quite well on

linux :D of course.

Awesome job Clem and the Whole Team!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: swap space as memory?

Post by Fred »

artie,

The short answer to your question is, maybe. :-)

Really I am a bit surprised that you are getting satisfactory results with only 128 MB. How much swap do you have setup?

If you are getting memory bound, thats to say you are getting into situations where you are using all your physical ram and all your swap space, then increasing your swap partition size could help you. I wouldn't set the swap at over 512 MB with only 128 MB or physical ram.

You will still be accessing the disk a lot so don't expect a big improvement. It will just decrease the amount of gymnastics the kernel and cpu have to do to keep operating.

Download and burn Gparted. Boot off that disk and you can change the size of the swap file. Be careful though. Depending on where the swap file is located, it may be a major pain to adjust the partition sizes to accommodate more swap, without corrupting something else. If you have some unused space on the hard drive, it might be easier to create another swap file. You can use more than one swap file you know. The operating system will just add the two files together.

When you are done you will need to update the UUID's in /etc/fstab for any partitions that you have changed. You will also have to make an entry in /etc/fstab for a second swap file if you made another one.

Good luck,

Fred
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: swap space as memory?

Post by MagnusB »

Using a flash drive as swap is a waste of a good flash drive. As Fred pointed out, there is little point in using more swap than 512 with 128 RAM, and I doubt you will get much improvement even if you used 2 gb. Also, since yoy do not have enough RAM (256 is recommended, and even then I find it to be a bit unstable), your computer will probably swap above normal, meaning much wear and tear on the flash drive, again giving a very short lifespan. So, no, this is not recommended, you could try if you want to, but I doubt you will get much improvement in performance.
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
artie
Level 1
Level 1
Posts: 24
Joined: Thu Oct 18, 2007 12:32 pm

Re: swap space as memory?

Post by artie »

To answer Freds question about the amount of swap space I allocated I just accepted the defaults during installation.
And just if you are curious installation took about an hour and a half (and lots of over heating!) due to low memory but once it was up and running it was actually a little faster than the windows 98 installation!
Thanks for your quick response guys
I think I'll be sticking with Mint for a long
while!
Much Appreciated,
artie
Locked

Return to “Beginner Questions”