LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-18-2004, 07:49 PM   #1
jmdlcar
Member
 
Registered: Nov 2003
Distribution: Porteus 3.2 Mate (Slackware)
Posts: 141

Rep: Reputation: 15
swap file question


I have 512mb of memory how big of swap file do I need?
 
Old 06-18-2004, 08:10 PM   #2
sporadic235
Member
 
Registered: May 2004
Location: Osaka
Distribution: FreeBSD 5.2, Mandrake 9.2
Posts: 39

Rep: Reputation: 15
usually 2-3 times of your memory size
 
Old 06-18-2004, 08:13 PM   #3
major.tom
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Slackware (current); Gentoo (newbie)
Posts: 142

Rep: Reputation: 15
I think 2-3x is an old standard. I have 256 megs in my box, and only use a swap partition of 128 megs. I think once you're have > 128 MB RAM, 1x swap should be plenty.

Garry
 
Old 06-18-2004, 09:19 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I don't push my box hard and run a slim Slack but I have 512 and usually hover in the 50% range without ever touching swap. I have 512 and, unless you're doing radically RAM-heavy stuff, wouldn't recommend any more.

I'm playing around in 10 now (so it's still a-building) and I've got:
Code:
~
659>> free
             total       used       free     shared    buffers     cached
Mem:        516868     505548      11320          0     105444     268488
-/+ buffers/cache:     131616     385252
Swap:       506008          0     506008
That's remarkably low even for me, but still - a gig of *total* RAM 'is more than enough for anybody'. The 2 times thing is outdated - and I've never heard 3. So put me down in major.tom's camp. 128,256,512 - whatever you want for some leeway, but no need to waste a lot of disk space on slow fake RAM.
 
Old 06-18-2004, 11:49 PM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
One nice thing about a swapfile instead of a swap partition is that you can change the size and experiment. my mini- distros that use windowmaker will easily run with 16MB RAM and 8MB swap. FFor the browser to have any cache, obviously more swap is needed. And if you run KDE or gnome you'll need more.
In your case 64MB should more than enough. People who do video editing or are 'remastering' ISO's may need up 3x the size of what they are working on. For instance to remaster a CD ISO of 700MB you will want at least 1.5GB and possible 2.1 GB.
Some people try to run without any swap at all, but this is not agood idea, either, since the kernel expects to find swap space and will tra to use it for a few bytes even if you have lots of RAM. Take a tip from ZipSlack and have at least a 512K swapfile around somewhere.
 
Old 06-19-2004, 09:28 AM   #6
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Rep: Reputation: 46
I have 512 mb and no swap file!

free
total used free shared buffers cached
Mem: 515480 210148 305332 0 20524 119776
-/+ buffers/cache: 69848 445632
Swap: 0 0 0
 
Old 06-19-2004, 01:23 PM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
many people notice no problems running with no swap, but as I've said before a bit of swap is linus' security blanket, he doesn't REALLY need it, but he does like to know it's there. If you have a way of testing, you may notice a performance improvement throught the use of a swap file of even 4K which is the minimum size recognized by the kernel. On some systems the kernel will actually spend quite a lot of time looking for a few bytes of swap space.
 
Old 06-19-2004, 03:23 PM   #8
slackMeUp
Member
 
Registered: Nov 2003
Distribution: Slack-where?
Posts: 654

Rep: Reputation: 30
If you plan on using suspend or software suspend you will need at least 1x the amout of your ram.
As a rule of thumb, I always do this. . .

64 megs of ram and lower = 3x swap.
96 megs to 256 megs of ram = 2x swap.
384 megs to 768 megs of ram = 1x swap.
768 megs and higher = .5x swap (unless you want to suspend to disk or software suspend)
 
Old 06-20-2004, 01:47 AM   #9
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
From everything I've read so far, while you can get by without any swapfile if you have enough RAM, it is usually a good idea to have a swapfile size of around 512MB total, which can be split up into smaller sizes for each hard drive you have.................For example, I have two swapfiles on two hard drives of 256MB each.......................
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast Question: SWAP-file in Ubuntu disabled by default? Waerner Ubuntu 2 07-14-2005 09:57 AM
swap file question ashley75 Linux - General 6 06-09-2005 09:00 AM
Mount question and hot swap question Dr Gutiemouth Linux - Newbie 8 10-20-2004 12:30 PM
Swap File Cyric Slackware 13 10-04-2004 11:19 PM
Swap file question c0rderr0y Linux - General 9 04-13-2004 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration