In the days of increasing RAM in computers - where 2GB is standard and 4GB or even 8GB is not unheard of - how many of you still use a swap partition. I think my first swap partition that I created back for Red Hat 9 was only about 1GB - back then they recommended double your amount of RAM for the swap. Today, some swaps would need to be 16GB or more to accommodate that recommendation. I believe that swap was used as a supplement for less RAM, but that help may no longer be needed.

So, how many of you still use a swap partition?

__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)

I still do -- 4GB with 3GB RAM -- simply because disk space is so cheap. Its size really is set to accommodate the memory requirements of the largest program you can run. I don't run anything that requires 7GB of RAM, but I could. And freeing 4GB out of the 200GB or so of disk that I have installed is not worth it.

Configuring swap space is insurance, but ultimately it depends on the system & how it is used. Being familiar with standard performance metrics observable with tools like top(1) is imperative -- especially in situations where space which would/should be configured as swap is scrimped upon.

The old adage of configuring 2x the amount of RAM has to be tempered with usage & what resources are available. Like DrJ, I am more liberal with configuring swap on systems where disk space is not an issue. However, on smaller systems were extremely limited storage is available (firewalls...), I reduce swap significantly.

Paraphrasing BSDfan666, the lack of any configured swap space can really hurt if it isn't available. Thus, I like the insurance of configured swap space on servers which are exposed to the wiles of the Internet. Yet for desktop systems, I can be more experimental because I'm more in control of what loads they are subjected.

Ultimately, the decision is yours, & if you can justify your decisions & live with the consequences if your decisions are wrong, go for it.

__________________religions, worst damnation of mankind"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus TorvaldsLinux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.vermaden's:linksresourcesdeviantartspreadbsd

The 'b' partition of your root drive automatically becomes your system swap partition. Many people follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. This rule is nonsense. On a modern system, that's a LOT of swap, most people prefer that their systems never swap. You don't want your system to ever run out of RAM+swap, but you usually would rather have enough RAM in the system so it doesn't need to swap. If you are using a flash device for disk, you probably want no swap partition at all. Use what is appropriate for your needs. If you guess wrong, you can add another swap partition in /etc/fstab or swap to a file later.

__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

The way I look at it, if my computer does not have enough virtual memory to complete the tasks I need of it, I can't use my computer to do what I need/want it to do, hence I've screwed myself by design.

All of my systems have swap space and /tmp allocated based on usage and hardware parameters.

I typically will use as much swap space as I ever intend to have RAM installed. And /tmp big enough to accomdate the largest unpacking jobs I expect to run, typically 0.1~1500mb

For example, my desktop has 2GB of RAM and 4GB of swap, it's maximum capacity is 4gb and disk space is huge. It rarely has extreme loads but sometimes does, hence lots of swap just in case of WW III !

My laptop has 512MB of RAM and 1GB of Swap which is the most I ever expect to have installed, although she tops out at 2GB of RAM.

I'm prone to doing a lot of things in short order on computers, to the point that I usually call it "omni tasking".

My laptop used to have 512MB of Swap and I've seen top come to close suggesting that my swap space is approaching exhaustion (~10s of mb left). I have not had that happen more then once or twice but by George, doubling my swap space is a small price for paranoia on an 80gb disk!

I never trust memory usage reported by any program, top included but I do consider it a guideline.

The PC pressed into service as a file server has about 300MB of swap and 384MB RAM -8MB for the gfx card.

Disk space was initially small (8GB), I have no reason to buy extra PC100, and it sits idle most of the time.

SSH, NFS, and MySQL currently running 'round the clock with provisions for Samba and printing software to be added later. She doesn't have much need for swapping, so the swap space was kept quite minimal.

normally if RAM is small (e.g. <1GB) or disk space cheap (e.g. > 80GB) I will usually opt for more swap then I need to worry about because I *can*.

In this case, extreme swap would've been more dentimental then memory problems.

A swap partition will not eat any bread.
Further, a swap partition will not eat a primary entry either, and all Linuces or *BSDs can mount an extended Linux swap partition.
Hard drive space is penty, so I have a swap parition in the "extended" area, usage 0% , available to whoever is concerned
Well, I am the kind of guy holding his pants with both a bet and suspenders.

La,la: 32MB of swap once was plenty.
If you intend to debug a memory dump, you might use a swap=memory. If this happens me twice, I reinstall the OS from fresh.
Some laptops suspend to swap (or elsewhere).
Some OSes really make a bad usage of the RAM (and swap).
----
edit
the FAQ reads: ... twice the size of your main system RAM. This rule is nonsense.

Firstly , free physical memory is good for a system. It means that it does not have to free up memory if a process suddenly requires a large amount of memory. (The other side of the tale, "Free memory is wasted memory," is also true: the two maxims must be balanced.)

That swap may simply be pages of memory that are cached in swap - The data is both in swap and in physical RAM, so the space is there if the system needs it, and the data is there if the process needs it. Best of both worlds.

And what is the point of paging back in idle data? The process is not likely to require it any time soon, or it wouldn't have stayed paged out for the last hour. I'll only have to swap it back out again, and I'm lazy. Despite having a brain the size of a planet....

__________________The only dumb question is a question not asked.
The only dumb answer is an answer not given.

That swap may simply be pages of memory that are cached in swap - The data is both in swap and in physical RAM, so the space is there if the system needs it, and the data is there if the process needs it. Best of both worlds.

That's true, and I had not considered that. But then why it is not released when the underlying processes are terminated? There is no need for those pages any longer, and one would think that the page file would release its contents.

What makes you think that X, gnome, the daemons or even the kernel is not the culprit? Indeed, it is these, long-running, largely-unused processes that often have bits of them swapped out, and, as the memory is idle, give no reason for the system to page them back in.

__________________The only dumb question is a question not asked.
The only dumb answer is an answer not given.