Skip to contentSkip to conversation

RAM and swap partition

DISCUSSION james miller 4 participants 6 messages Dec 9, 2002 – Dec 10, 2002

lore
Share & tools
lore
#0 lore raw

Let me pose the RAM question in another way to see if it can elicit a generic, "rule-of-thumb" response this way. If a person uses their computer as a sort of personal workstation using a fairly recent distro and requires that it have an Xwindows gui, using applications like web browsers, email clients, wordprocessing software and maybe Gimp on occassion, at what point would such a person need to have a swap partition? In other words, can it be stated in somewhat generic terms "if said user had less than X MB RAM, they will definitely need a swap partition"? And what about guidelines for swap partition size in such a
case: can such be stated as well? Like, say, "if this individual has only 32 MB RAM, he should have a 64 MB swap partition" or "if he has 64 MB RAM he'll only need a 64 MB swap partition"?

Thanks, James

Quoted 56 lines

===== Original Message From Chuck Gelm <[email protected]> ===== Ditto to what Ray said.

Perhaps you could run your system with a 'swap file' and see how big it ever gets. Then make a swap partition just that size or a little larger. ;-)

My current firewall-router (aDSL to 100 Mb LAN) has 32 megabytes
of RAM and has not used any swap memory, AFAICR.
Another workstation with 64 M of RAM has used 3 M of swap. Another workstation with 160 M of RAM has used 2 M of swap. Another laptop with 16 M of RAM, XFfree86 v4.0.3, and I just
ran Netscape v4.77 under fvwm95, loaded a small web page, has used 2.6 M of swap.

IMHO, it depends. ;-)

HTH, Chuck

Quoted 8 lines · Ray Olszewski
Quoted 6 lines · Rolf Edlund

Originally to: james niland

jn> I know some people who run happily without a swap at all.

How low RAM can I use, without running a swap ? Can I for example

do it on

Quoted 4 lines
Quoted 2 lines

a 486
with 4 MB RAM ?

The way you ask this question, it has no real answer. How little

memory a

Quoted 1 line

system can run with depends on what tasks it is doing. And the

choice of

Quoted 1 line

CPU is pretty much irrelevant to this question (its only slight

relevance

Quoted 3 lines

is in the smaller size of CPU-specific kernels).

That said ... running any sort of Linux system in less than 8 MB of

real

Quoted 1 line

(not swap) RAM poses special challenges ... most modern distros

can't even

Quoted 1 line

install on such systems (only Slackware, I think, still offers a

"low

Quoted 1 line

memory" install option) and you won't be able to do much with such

a

Quoted 1 line

system. In practice, the smallest systems I've ever run without

swap were

Quoted 1 line

486s with 16 MB of RAM, and that was for special purpose systems

like

Quoted 1 line

routers. While these days I routinely run my workstations without a

swap

Quoted 2 lines

partition, they have at least 256 MB of RAM.

Quoted 7 lines
Quoted 2 lines

-- -------------------------------------------"Never tell me the

odds!"--------

Quoted 3 lines

Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]

-----------------------------------------------------------------------------

--

Quoted 6 lines
Quoted 1 line

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 4 lines · james miller

Let me pose the RAM question in another way to see if it can elicit a generic, "rule-of-thumb" response this way. If a person uses their computer as a sort of personal workstation using a fairly recent distro and requires that it have an Xwindows gui, using applications like web

Quoted 8 lines

browsers, email clients, wordprocessing software and maybe Gimp on occassion, at what point would such a person need to have a swap partition? In other words, can it be stated in somewhat generic terms "if said user had less than X MB RAM, they will definitely need a swap partition"? And what about guidelines for swap partition size in such a
case: can such be stated as well? Like, say, "if this individual has only 32 MB RAM, he should have a 64 MB swap partition" or "if he has 64 MB RAM he'll only need a 64 MB swap partition"?

I cannot help you with "definitely" answers. But I can tell you the rules of thumb I've used when setting up workstations (which don't exactly use the mix of stuff you ask about, but come close).

If I am setting up a system with 256 MB or less of RAM, I include a swap partition. If the system is using a modern hard disk (that is, one that is 20 GB or more), I make swap twice the size of RAM; if I is using a small, old hard disk, I make it equal to RAM for sizes close to 256, twice RAM for significantly smaller sizes (trading off filesystem space against swap space is itself a judgment call for 128 and 192 MB systems).

If I were setting up a system with more than 256 MB of RAM and a modern hard disk (and this is all I really do these days for workstations), I *create* a swap partition equal in size to RAM, but I do not make it active. I have never actually found a need for a swap partition on a workstation with 256 MB of RAM or more, but that way I have one in reserve if I need it.

As a general matter, if you are running a system that uses swap regularly (rather than very rarely, say just when you custom compile apps or kernels), the performance hit you are taking probably justifies paying the relatively small cost of adding RAM if you can (of course, some older mobos still in circulation, such as older E-Machine Celeron boards, won't take more than 256 MB, limiting your options). And I've seen occasional segfaults that *seem* to be associated with swap access in recent 2.4.x kernels, so I try to avoid even rare uses of swap on my newer (512+ MB RAM) systems.

It's hard for me to think sensibly about what I'd do on a system with, say, 16 or 32 MB of RAM, because I can't seriously imagine setting up such a system as a workstation today (though I use such systems for specialized purposes ... routers, mainly). Back when I ran such systems, I used swap that was twice the size of RAM, and that's probably what I'd do today up to 64 MB, maybe even up to 128 MB.

Bottom line, though ... there are no hard and fast guidelines these days for "best practice" swap setup.

--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
Quoted 5 lines · Ray Olszewski

It's hard for me to think sensibly about what I'd do on a system with, say, 16 or 32 MB of RAM, because I can't seriously imagine setting up such a system as a workstation today

You might be surprised at the number of people today trying to install Linux on computers with less than 32mb RAM. It not unusual for Windows users to try Linux on a dusty old PC (rather than risk their precious Windows machine). Also, there are still quite a few laptops in regular use with less than 32mb RAM.

One of the advantages of Linux is that it still quite usable on old hardware. A light X runs pretty well on 12mb RAM -- I even know of some people running X with 4mb RAM (*shudder*).

Cheers,
Steven

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#3 lore raw
In reply to james miller

It depends.

Quoted 8 lines · james miller

Let me pose the RAM question in another way to see if it can elicit a generic, "rule-of-thumb" response this way. If a person uses their computer as a sort of personal workstation using a fairly recent distro and requires that it have an Xwindows gui, using applications like web browsers, email clients, wordprocessing software and maybe Gimp on occassion, at what point would such a person need to have a swap partition?

You would need to have a swap partition when your system
'runs out of' real memory. It depends on how much memory the applications request/need. There are many, many window managers from tiny 'twm' to huge KDE & GNOME. I would guess that there are small and large 'word processing' software.

I can run Xwindows, fvwm95, netscape v4.77, in 48 Megabytes
of virtual memory. It would run much faster if 32 or more magabytes were real RAM. ;-) However, it does run.

Quoted 3 lines

In other words, can it be stated in somewhat generic terms
"if said user had less than X MB RAM, they will definitely need a swap partition"?

It depends on what is requesting memory.

Quoted 4 lines

And what about guidelines for swap partition size in such a
case: can such be stated as well? Like, say, "if this individual has only 32 MB RAM, he should have a 64 MB swap partition" or "if he has 64 MB RAM he'll only need a 64 MB swap partition"?

It depends.

Tell the list what you plan to run and you will probably
get many suggestions. ;-)

HTH, Chuck

Quoted 73 lines

Thanks, James

Quoted 56 lines

===== Original Message From Chuck Gelm <[email protected]> ===== Ditto to what Ray said.

Perhaps you could run your system with a 'swap file' and see how big it ever gets. Then make a swap partition just that size or a little larger. ;-)

My current firewall-router (aDSL to 100 Mb LAN) has 32 megabytes
of RAM and has not used any swap memory, AFAICR.
Another workstation with 64 M of RAM has used 3 M of swap. Another workstation with 160 M of RAM has used 2 M of swap. Another laptop with 16 M of RAM, XFfree86 v4.0.3, and I just
ran Netscape v4.77 under fvwm95, loaded a small web page, has used 2.6 M of swap.

IMHO, it depends. ;-)

HTH, Chuck

Quoted 8 lines · Ray Olszewski
Quoted 6 lines · Rolf Edlund

Originally to: james niland

jn> I know some people who run happily without a swap at all.

How low RAM can I use, without running a swap ? Can I for example

do it on

Quoted 4 lines
Quoted 2 lines

a 486
with 4 MB RAM ?

The way you ask this question, it has no real answer. How little

memory a

Quoted 1 line

system can run with depends on what tasks it is doing. And the

choice of

Quoted 1 line

CPU is pretty much irrelevant to this question (its only slight

relevance

Quoted 3 lines

is in the smaller size of CPU-specific kernels).

That said ... running any sort of Linux system in less than 8 MB of

real

Quoted 1 line

(not swap) RAM poses special challenges ... most modern distros

can't even

Quoted 1 line

install on such systems (only Slackware, I think, still offers a

"low

Quoted 1 line

memory" install option) and you won't be able to do much with such

a

Quoted 1 line

system. In practice, the smallest systems I've ever run without

swap were

Quoted 1 line

486s with 16 MB of RAM, and that was for special purpose systems

like

Quoted 1 line

routers. While these days I routinely run my workstations without a

swap

Quoted 2 lines

partition, they have at least 256 MB of RAM.

Quoted 7 lines
Quoted 2 lines

-- -------------------------------------------"Never tell me the

odds!"--------

Quoted 3 lines

Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]

-----------------------------------------------------------------------------

--

Quoted 6 lines
Quoted 1 line

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Quoted 5 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#4 lore raw
In reply to james miller

It depends.

Quoted 8 lines · james miller

Let me pose the RAM question in another way to see if it can elicit a generic, "rule-of-thumb" response this way. If a person uses their computer as a sort of personal workstation using a fairly recent distro and requires that it have an Xwindows gui, using applications like web browsers, email clients, wordprocessing software and maybe Gimp on occassion, at what point would such a person need to have a swap partition?

You would need to have a swap partition when your system
'runs out of' real memory. It depends on how much memory the applications request/need. There are many, many window managers from tiny 'twm' to huge KDE & GNOME. I would guess that there are small and large 'word processing' software.

I can run Xwindows, fvwm95, netscape v4.77, in 48 Megabytes
of virtual memory. It would run much faster if 32 or more magabytes were real RAM. ;-) However, it does run.

Quoted 3 lines

In other words, can it be stated in somewhat generic terms
"if said user had less than X MB RAM, they will definitely need a swap partition"?

It depends on what is requesting memory.

Quoted 4 lines

And what about guidelines for swap partition size in such a
case: can such be stated as well? Like, say, "if this individual has only 32 MB RAM, he should have a 64 MB swap partition" or "if he has 64 MB RAM he'll only need a 64 MB swap partition"?

It depends.

Tell the list what you plan to run and you will probably
get many suggestions. ;-)

HTH, Chuck

Quoted 73 lines

Thanks, James

Quoted 56 lines

===== Original Message From Chuck Gelm <[email protected]> ===== Ditto to what Ray said.

Perhaps you could run your system with a 'swap file' and see how big it ever gets. Then make a swap partition just that size or a little larger. ;-)

My current firewall-router (aDSL to 100 Mb LAN) has 32 megabytes
of RAM and has not used any swap memory, AFAICR.
Another workstation with 64 M of RAM has used 3 M of swap. Another workstation with 160 M of RAM has used 2 M of swap. Another laptop with 16 M of RAM, XFfree86 v4.0.3, and I just
ran Netscape v4.77 under fvwm95, loaded a small web page, has used 2.6 M of swap.

IMHO, it depends. ;-)

HTH, Chuck

Quoted 8 lines · Ray Olszewski
Quoted 6 lines · Rolf Edlund

Originally to: james niland

jn> I know some people who run happily without a swap at all.

How low RAM can I use, without running a swap ? Can I for example

do it on

Quoted 4 lines
Quoted 2 lines

a 486
with 4 MB RAM ?

The way you ask this question, it has no real answer. How little

memory a

Quoted 1 line

system can run with depends on what tasks it is doing. And the

choice of

Quoted 1 line

CPU is pretty much irrelevant to this question (its only slight

relevance

Quoted 3 lines

is in the smaller size of CPU-specific kernels).

That said ... running any sort of Linux system in less than 8 MB of

real

Quoted 1 line

(not swap) RAM poses special challenges ... most modern distros

can't even

Quoted 1 line

install on such systems (only Slackware, I think, still offers a

"low

Quoted 1 line

memory" install option) and you won't be able to do much with such

a

Quoted 1 line

system. In practice, the smallest systems I've ever run without

swap were

Quoted 1 line

486s with 16 MB of RAM, and that was for special purpose systems

like

Quoted 1 line

routers. While these days I routinely run my workstations without a

swap

Quoted 2 lines

partition, they have at least 256 MB of RAM.

Quoted 7 lines
Quoted 2 lines

-- -------------------------------------------"Never tell me the

odds!"--------

Quoted 3 lines

Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]

-----------------------------------------------------------------------------

--

Quoted 6 lines
Quoted 1 line

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Quoted 5 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#5 lore raw
In reply to james miller
Quoted 3 lines · james miller

Let me pose the RAM question in another way to see if it can elicit a generic, "rule-of-thumb" response

I'm happy to give you my personal "rule-of-thumb", but that's all it is. It's not an absolute truth.

Every system gets at least 16mb of total memory.
So, a system with 4mb RAM gets 12mb swap.

Light X installations with slim wm (*not* KDE or Gnome) get at least 32mb total memory. So, a system with 12mb RAM gets 24mb swap.

Heavy X installations need RAM. Lots of RAM. Swap is less relevant on such systems.

Cheers,
Steven

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs