Dear all, I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup? Rohit ********************************************************* Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. ********************************************************* Visit us at http://www.mahindrabt.com
On 2003-08-28, Rohit wrote:
Dear all,
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
I would at least double the swap. You can read about swap here: <http://people.debian.org/~psg/ddg/node81.html> and here: <http://www.cs.uwa.edu.au/programming/linux/linux-HOWTO/mini/Partition-3.html> Cheers, HÖ -- /// Helgi Örn Helgason, Registered Linux User: #189958 \\\ \\\ ~~~~ SuSE 8.2 * Kernel 2.4.20-4GB * KDE 3.1.3 ~~~~ ///
On Thursday 28 August 2003 10:54, Helgi Örn Helgason wrote:
On 2003-08-28, Rohit wrote:
Dear all,
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
I would at least double the swap. You can read about swap here: <http://people.debian.org/~psg/ddg/node81.html> and here: <http://www.cs.uwa.edu.au/programming/linux/linux-HOWTO/mini/Partition-3.ht ml>
Cheers, HÖ
"In Linux, a single swap partition can not be larger than 128 MB. That is, the partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap, you have to create multiple swap partitions. " Is this statement true ? A max of 128 mg of swap ? Thank you for your time Lee
On Fri, 29 Aug 2003 15:31:56 -0400 lee <lnx@alltel.net> wrote:
"In Linux, a single swap partition can not be larger than 128 MB. That is, the partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap, you have to create multiple swap partitions. "
Is this statement true ? A max of 128 mg of swap ?
Thank you for your time
Not true. Swap can be any size. Read "man mkswap". -- Our body's 20 milligrams of beta radioactive Potassium 40 emit about 340 million neutrinos per day, which go at lightspeed to the ends of the universe!..even thru the earth.
On Fri, 2003-08-29 at 21:31, lee wrote:
"In Linux, a single swap partition can not be larger than 128 MB. That is, the partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap, you have to create multiple swap partitions. "
Is this statement true ? A max of 128 mg of swap ?
From what I remember (please correct me if I'm wrong) the max size for
That is rubbish - where did you read that? According to xosview, I'm currently using 153mb which is about half of my swap partition. the swap filesystem is 2gb, which is where you would make multiple swap partitions if you need more swap space. Hans
On Sat, Aug 30, 2003 at 05:20:29PM +0200, H du Plooy wrote:
On Fri, 2003-08-29 at 21:31, lee wrote:
"In Linux, a single swap partition can not be larger than 128 MB. That is, the partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap, you have to create multiple swap partitions. "
Is this statement true ? A max of 128 mg of swap ?
That is rubbish - where did you read that?
This is not rubbish. Your reaction just speaks of how long you have been using Linux. It's better be called Linux history. SuSE Linux 6.4 Installation, Configuration, First Steps, p.62: "If your system is still running with the 2.0.xx kernel, you should bear in mind that a swap partition chould be no larger than 128 MB; Linux can, however, quite easily manage 8 such partitions -- and even 64 with slight modifications. For the 2.2.xx kernel the limit of the swap partition is 2 GB" Regards, -Kastus
On Sat, 2003-08-30 at 17:41, Kastus wrote:
"If your system is still running with the 2.0.xx kernel, you should bear in mind that a swap partition chould be no larger than 128 MB; Linux can, however, quite easily manage 8 such partitions -- and even 64 with slight modifications. For the 2.2.xx kernel the limit of the swap partition is 2 GB"
Regards, -Kastus
I stand corrected. However, I think it's reasonable to expect people to be specific about the kernel version if they are referring to such an old kernel. To that end it should have read "...a single swap partition could not be larger than 128mb..." Linux 2.0 is more than half of linux's lifetime ago... :-) HAns
On Sat, 30 Aug 2003 21:47:24 +0200 H du Plooy <linuser@ananzi.co.za> wrote:
I stand corrected. However, I think it's reasonable to expect people to be specific about the kernel version if they are referring to such an old kernel. To that end it should have read "...a single swap partition could not be larger than 128mb..."
Yes, but that was the issue- a categoric statement should either have caveats or not be made. Terence
On Friday 29 August 2003 15:31 pm, lee wrote:
On Thursday 28 August 2003 10:54, Helgi Örn Helgason wrote:
On 2003-08-28, Rohit wrote:
Dear all,
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
I would at least double the swap. You can read about swap here: <http://people.debian.org/~psg/ddg/node81.html> and here: <http://www.cs.uwa.edu.au/programming/linux/linux-HOWTO/mini/Partiti on-3.ht ml>
Cheers, HÖ
"In Linux, a single swap partition can not be larger than 128 MB. That is, the partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap, you have to create multiple swap partitions. "
Used to be true.... You must have read some old info.
Is this statement true ? A max of 128 mg of swap ?
Thank you for your time
Lee
-- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 08/30/03 12:25 + +----------------------------------------------------------------------------+ Fox on Problematics: "When a problem goes away, the people working to solve it do not"
On Sunday 31 August 2003 22:06, Carlos E. R. wrote:
The 03.08.29 at 15:31, lee wrote:
Is this statement true ? A max of 128 mg of swap ?
Was. Not "is".
I think you read some old howto.
Thank you all very much for taking the time to reply..I saw this I believe on the LDP page..great info there, but sadly way out of date.. Lee
The 03.09.01 at 10:53, lee wrote:
I think you read some old howto.
Thank you all very much for taking the time to reply..I saw this I believe on the LDP page..great info there, but sadly way out of date..
Linux is a fast moving target. I think you will find both outdated docs and new docs: you just have to notice the date of the howto. But yes, it can be dificult sometimes to know when the info has been superseded. At least, you didn't buy a book just to find it was almost useless! It happened to me :-) -- Cheers, Carlos Robinson
On Thu, 2003-08-28 at 15:09, Rohit wrote:
Dear all,
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
When you run out or physical RAM, the system will try and page some things out. You can end up paging things out even if you are not running many/large applications. Sometimes the system runs more efficiently with some things you don't use swapped out and more RAM for disk cache. My advise would be to up the physical RAM you have, and leave the 128MB swap as is. If you disable swap completely, you may end up with things getting killed by the OOM killer in the kernel if it for some reason run out of RAM. Someone else may have an idea of when swap starts becoming a non-issue, like at 16GB or 32GB of RAM.. :) Rgds, -- Anders Karlsson <anders@trudheim.com> Trudheim Technology Limited
Quoting Rohit <rohits@mahindrabt.com>:
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
Swap space should really be 2 times the physical ram in a machine. This is required if the memory is filled by the programes you are using, then you load a program like for example OpenOffice. There will not be enough ram for this program so all/some of the programs in ram will need to be put to swap. If you then need to swap back to one or all of these other programs, you need swap space to copy whatever is currently in memory to the swap space. If you've only got 1x physical ram, you may get problems. If you decide to remove swap space, you may also get problems. Basically if Linux runs out of memory it starts randomly (well it appears random) killing applications. The program it kills might just be your important document that you've spent the last 2 hours creating. I would keep the swap space, as you never know what could happen. Better safe then sorry. I would recommend adding more ram as Linux uses it for caching. So if some program doesn't need the ram it is normally put to some good use, although too much is just a waste of money. Adam
The 03.08.28 at 16:11, Adam Leach wrote:
Swap space should really be 2 times the physical ram in a machine.
Not really... that was a rule of thumb said for old windows (it was really unable to use more). In linux, I have used as much as 40 times more swap than ram. Ie, the rule for linux should be: "as much swap as you need". Determining that "how much" is the big problem :-) -- Cheers, Carlos Robinson
The 03.08.28 at 16:11, Adam Leach wrote:
Swap space should really be 2 times the physical ram in a machine.
On Mon, 1 Sep 2003 12:16 pm, Carlos E. R. replied:
Not really... that was a rule of thumb said for old windows (it was really unable to use more). In linux, I have used as much as 40 times more swap than ram.
I read somewhere that the 2.4 kernel works better with swap at least 2 times the physical ram. That said, I want to make a diskless fanless silent workstation (netbooting) so I won't have anything to swap onto. If I just bung in a Gig of ram...? -- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166
The 03.09.02 at 11:23, Michael.James@csiro.au wrote:
I read somewhere that the 2.4 kernel works better with swap at least 2 times the physical ram.
Could be. I don't think there is a real, clear rule that specifies how much swap is needed; at least, I haven't seen it. If you have 1Gbyte of ram, you could get away with no swap at all, or very little - except if you use big databases, for example.
That said, I want to make a diskless fanless silent workstation (netbooting) so I won't have anything to swap onto. If I just bung in a Gig of ram...?
Depends on what you will be running on it. I don't think you can run swap from the network... But I suppose that RAM should be enough. -- Cheers, Carlos Robinson
-----Original Message----- From: "Carlos E. R." <robin1.listas@tiscali.es> To: suse-linux-e@suse.com Date: Tue, 2 Sep 2003 21:54:22 +0200 (CEST) Subject: Re: [SLE] Why have swap
The 03.09.02 at 11:23, Michael.James@csiro.au wrote:
I read somewhere that the 2.4 kernel works better with swap at least 2 times the physical ram.
Could be. I don't think there is a real, clear rule that specifies how much swap is needed; at least, I haven't seen it. If you have 1Gbyte of ram, you could get away with no swap at all, or very little - except if you use big databases, for example.
The rule on swap used to be 2x the amount of ram. That was when ram was VERY expensive. I remember paying $40 a meg for ram and swap was less expensive to use. With ram much less expensive to day people can afford more ram to run their PC, so the 2x rule is as criticle as it once was. Yes on systems running large databases you will still want to use a lot of swap just in case, but then if you start swapping you know it's time to buy more ram. When swap is used it will cause the system to run slower because of the added overhead of writing to the disk. It still does not hurt to have 2x for swap with disk drives being so cheap today who is going to miss 1 gig of disk space that is used for swap. Better to have swap and have the PC keep running then not have any swap and have the PC crash when it runns out of memory. Ken
The 03.09.02 at 17:57, Ken Schneider wrote:
ram, you could get away with no swap at all, or very little - except if you use big databases, for example.
The rule on swap used to be 2x the amount of ram. That was when ram was VERY expensive. I remember paying $40 a meg for ram and swap was less expensive to use. With ram much less expensive to day people can afford
I remember first seeing that rule when I used windows 3.x. In fact, if you tried to use more that that it would warn you that it was useless, the OS would only use double the RAM. On later days, perhaps for W95, it would reserve half the bigger block on the HD. But, in Linux, I have a system with 32 Mb RAM, and well over 600 mbytes swap, perhaps a gigabyte... and it runs fine. Other people have none, and it works. So, the double rule is useless for Linux. It is way more complicated than that. So, I just recommend "as much as you need".
going to miss 1 gig of disk space that is used for swap. Better to have swap and have the PC keep running then not have any swap and have the PC crash when it runns out of memory.
Of course. And, anyway, even if RAM is cheap, HD is cheaper. Only if you repeatedly use big memory hungry programs it makes sense to buy an extra gigabyte :-) -- Cheers, Carlos Robinson
On Tuesday 02 September 2003 21:54, Carlos E. R. wrote:
Depends on what you will be running on it. I don't think you can run swap from the network...
Yes, you can. Mount a partion over NFS readable/writable and use a swap-file, not a swap-partions. Don't expect it to be very fast when the machine starts swapping, but it will keep on running. Regards, Cees.
On Tue, Sep 02, 2003 at 11:23:14AM +1000, Michael.James@csiro.au wrote:
I read somewhere that the 2.4 kernel works better with swap at least 2 times the physical ram.
Linus Torvalds said so himself on the Linux Kernel Mailing List (although I can't immediately find the link.
That said, I want to make a diskless fanless silent workstation (netbooting) so I won't have anything to swap onto. If I just bung in a Gig of ram...?
I built a diskless, fanless silent firewall (netbooting) around SuSE 7.2, by chucking in 384 MB RAM. It netbooted from an FTP server, and once booted, ran entirely from ramdisk. -- David Smith Work Email: Dave.Smith@st.com STMicroelectronics Home Email: David.Smith@ds-electronics.co.uk Bristol, England GPG Key: 0xF13192F2
On Thursday 28 August 2003 14:18, Rohit wrote:
Dear all,
I have 128 MB RAM and 128 MB swap right now. What if I double my RAM and disable swap altogether? What can go wrong for the same setup?
Rohit
An interesting question. If you run out of RAM your system will get a bit upset and bad things happen, as already described. But I'd guess this is also true if you run out of RAM + swap (I've not managed to do it yet). I guess the point is that while RAM is cheap, disk space is cheaper. Do you really need that extra 128MB of disk space? It's probably worth having the peace of mind that memory is no issue, and keep it. If your disk has filled up, 128MB won't last too long anyway - buy another. Arthur
participants (16)
-
Adam Leach
-
Anders Karlsson
-
Arthur Magill
-
Bruce Marshall
-
Carlos E. R.
-
Cees van de Griend
-
Dave Smith
-
H du Plooy
-
Helgi Örn Helgason
-
Kastus
-
Ken Schneider
-
lee
-
Michael.James@csiro.au
-
Rohit
-
Terence McCarthy
-
zentara