Jump to content

To make it faster...


ahmad
 Share

Recommended Posts

This is strange. My main machine also has 1 GB RAM and 2 GB Swap and Mandriva NEVER used my swap, not even with evolution opened (max RAM used I managed was some 950 MB so far). Evo uses 22 MB on my boxes.

 

Disabling swap should basically not make your computer faster, it will only make it more unstable. I highly recommend not to disable it unless you have more than 2 GB Ram. (Yeah, call me paranoid B) )

If I remove the swap partition from fstab, will it do the work or 'swapoff -a' is the only solution?
Removing it from fstab would do the trick, but as said: I don't recommend doing this.

 

Could you explain further (disabling swap making the system unstable)?

 

I haven't experienced any issues or crashes when I disable swap on my slower system. Mandriva actually runs better when I turn off the swap on that system.

Link to comment
Share on other sites

When you have a high memory-load, the swap partition will be used in order to avoid that your system ressources won't meet the applications RAM requirements. It works a bit like a virtual RAM and will balance things out and prevent a system-freeze. Let's say e.g. you have a laptop with 256 MB RAM. 64 MB of it are used for the internal graphics card. Then you install e.g. Fedora 5, which needs at least 256 MB RAM for running halfway decently. You run Gnome, open OpenOffice, Evolution, Firefox with several tabs and perhaps Gimp while playing music with e.g. Rythmbox. Your system will have a lot to do in order to keep all those things up and running. And it will normally use the swap partition now for balancing the memory usage and taking some "pressure" of your real RAM (Which is now completely used up). If you don't have the swap partition, the computer will have to press all the RAM requirements from the apps into the - now reduced - RAM amount that is available. If the discrepancy is too high, the system can freeze or processes will take forever to be completed (e.g. waiting five minutes only for closing Firefox). The system is thus instable/unresponsive. So: if you have a high apps-memory load and/or low RAM ressources, then keep swap activated.

 

Just my opinion of course.

Link to comment
Share on other sites

OK...

 

I just did a test on the slower system.

 

I opened up SeaMonkey, loaded in a CD (running KsCD) and opened a Konsole window, with swap turned on. The amount of swap used was 48 Kb.

 

Leaving everything as it was, I then opened up OpenOffice.org 1.5. The amount of swap used jumped to 14 Mb.

 

I typed a one line sentence in OpenOffice, then sent it to the printer. When the printer (USB) began to print the page, the audio broke up.

 

I then closed the Konsole window and printed the same to the printer. The audio breaks up even more than above. The sound card is an Inland wavetable, it has a C-Media (CMI) 8738 chip on it.

 

Have I now reached the limitations of the slower system?

Edited by edwardp
Link to comment
Share on other sites

I copied and pasted the same text so that it filled up one page. In sending that to the printer, the audio continues to break up, however the printer is printing the page one line at a time, it prints one pass, waits a few seconds, then prints the next pass. At this rate, it might take 10 minutes to print that one page (all text).

 

"free" shows 30 Mb of swap being used at present.

 

With SeaMonkey closed, it shows 32 Mb of swap used and the printer is still printing that one page.

 

<edit>

 

With swap turned off, repeating the above, the same occurs, slow printing and audio breaking up during printing.

 

</edit>

Edited by edwardp
Link to comment
Share on other sites

Hmmm.. where is your swap placed on your harddrive? (first partition? last? somewhere between?) and how many rpms does it have? 5400 rpm? 7200 rpm? The rotating speed of the drive has a huge effect on swap performance, as well as its placement in my experience.

Link to comment
Share on other sites

The drive is a Maxtor 40 GB drive, 5400 RPM.

 

I do not know where the swap partition is located, but thanks to the previous SuSE installation on both machines, I now have separately partitioned /home's which I did not have previously.

Edited by edwardp
Link to comment
Share on other sites

Launching "fdisk -l" as root will list all partitions and show you where your swap is located. For maximum speed on low RAM system with a 5400 rpm drive, I highly recommend to place swap at the start of the drive = first partition. Faster access to swap, better performance.

Link to comment
Share on other sites

I'll have to do that on the next installation (Mandriva 2007) when it's released, since I don't think it is possible to move the swap from its current location (assuming it's not at the beginning - I'm on a Windows box currently, so I can't check) without losing everything else.

Edited by edwardp
Link to comment
Share on other sites

That's cool then, I always set my systems up this way, I believe they are much faster that way.

 

There will also be a block count listed, so you can get a rough idea of how big it is. Or just above the partitions you have a line:

 

Units = cylinders of 16065 * 512 = 8225280 bytes

 

and you can then work out from this how much space is being taken for the swap.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...