[opensuse] How Much Swap?
Hi Folks, Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible. As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full. So, any opinions on swap size in relation to RAM? Thanks, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 26 Jun 2013 15:12:53 +0100, Lew Wolfgang <wolfgang@sweet-haven.com> wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
Thanks, Lew
With that much RAM, you probably don't even need swap...surely -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Lew Wolfgang wrote:
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb.
I believe that's now obsolete. Things have changed a lot since then, one being computers have a lot more memory. Also, swap is only necessary when you exceed the RAM. How likely is that now, with that 64 GB? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Typically we just give 2GB and let it be; I've heard extensive discussions in other Novell listservs that vary anywhere between that number all the way down to sometimes not allocating any swap at all. But we go the 2GB route just to be safe, irregardless of how much memory a box has. A big exception would be SuSE servers that host Oracle databases however; those still have the huge swap requirements. Chris
Lew Wolfgang 06/26/13 9:14 AM >>> Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible. As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full. So, any opinions on swap size in relation to RAM? Thanks, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Christopher Myers wrote:
irregardless of how much memory a box has.
ARRGGHHH!!!!! It's "regardless", not "irregardless". By adding the "ir" in front, you're saying exactly the opposite of what you think you are. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/26/2013 10:27 AM, James Knott wrote:
Christopher Myers wrote:
irregardless of how much memory a box has.
ARRGGHHH!!!!!
It's "regardless", not "irregardless".
By adding the "ir" in front, you're saying exactly the opposite of what you think you are.
If you're fairly young, you will probably live long enough to find irregardless in your dictionary. This is a battle you'll surely lose. --doug -- Blessed are the peacemakers..for they shall be shot at from both sides. --A.M.Greeley -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Doug wrote:
This is a battle you'll surely lose.
Ignorance doesn't make it right. I have seen a dramatic decline in grammar, spelling and composition over the years.. This makes it increasingly difficult to understand what is being said. If this continues we'll soon be back in the middle ages, when it was a struggle to understand what someone had written. Once again, it's a sign of ignorance and not something that should be tolerated, let alone encouraged. Perhaps we should be examining why today's students are so bad at grammar, spelling, punctuation, composition, arithmetic, science, history, geography and more. More precisely, why is the education failing the students? Incidentally, I recently read a newspaper article about a 14 year old boy, who was unable to sign his name, because he'd never been taught to write. When people don't understand history and geography, they can't understand the world around them. Lack of science education allows the rise of delusion about many things, including religion. A dumbed down world is one that's open to be manipulated by someone, be it politicians, business interests or religious leaders. So, if you simply want to be one of a herd of sheep, go ahead and prove your ignorance and use "irregardless". You'll have no one to blame, but yourself, for the consequences. BTW, not too long ago, it was the policy of the Texas Republicans to oppose critical thinking in the school system. Keep 'em dumb and controllable. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/26/2013 10:17 AM, James Knott wrote:
BTW, not too long ago, it was the policy of the Texas Republicans to oppose critical thinking in the school system. Keep 'em dumb and controllable.
Cites please? Not that I'm saying you're wrong, James, I'd just like to see the context. Is it time to move this to offtopic? Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Lew Wolfgang wrote:
On 06/26/2013 10:17 AM, James Knott wrote:
BTW, not too long ago, it was the policy of the Texas Republicans to oppose critical thinking in the school system. Keep 'em dumb and controllable.
Cites please? Not that I'm saying you're wrong, James, I'd just like to see the context.
http://www.washingtonpost.com/blogs/answer-sheet/post/texas-gop-rejects-crit... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
Lew Wolfgang wrote:
BTW, not too long ago, it was the policy of the Texas Republicans to oppose critical thinking in the school system. Keep 'em dumb and controllable. Cites please? Not that I'm saying you're wrong, James, I'd just
On 06/26/2013 10:17 AM, James Knott wrote: like to see the context. http://www.washingtonpost.com/blogs/answer-sheet/post/texas-gop-rejects-crit...
Here's a good one from that article: "Controversial Theories – We support objective teaching and equal treatment of all sides of scientific theories. We believe theories such as life origins and environmental change should be taught as challengeable scientific theories subject to change as new data is produced." There are still a lot of creations running around. As an example, look at what happened in Dover, Penn. pedia.org/wiki/Kitzmiller_v._Dover_Area_School_District Also, many on the right refuse to accept the risk of global warming issues, calling the virtually 100% recognition of the problem by scientists "controversial". This is the kind of nonsense that's becoming popular these days. In the past, it was done by the church (and still is), now the right wing politicians. What's worse is the fundamentalists who welcome the coming climate problems as part of the Armageddon. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Jun 26, 2013 at 10:12 AM, Lew Wolfgang <wolfgang@sweet-haven.com> wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
Thanks, Lew
Lew, As others have said, the guidelines are gone. It is now application specific. I default to 1x just so that I don't have to worry about ever running out. Effectively for most of my work loads if I ever use as much swap as ram, then my computer is running too slow to be effectively functional. fyi: I built a machine with 128GB of RAM a year ago. I had Java apps that allowed me to set their max memory usage. I set them to cumulatively be 96 GB and used the last 32 GB for cache and other system programs. I only setup a 16GB swap as I recall. That would allow rarely used code pages to be pushed to swap and use that ram for cache instead. Lots of cache can be a great thing for some workloads. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed 26 Jun 2013 10:34:53 AM CDT, Greg Freemyer wrote:
On Wed, Jun 26, 2013 at 10:12 AM, Lew Wolfgang <wolfgang@sweet-haven.com> wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
Thanks, Lew
Lew,
As others have said, the guidelines are gone. It is now application specific. I default to 1x just so that I don't have to worry about ever running out. Effectively for most of my work loads if I ever use as much swap as ram, then my computer is running too slow to be effectively functional.
fyi: I built a machine with 128GB of RAM a year ago. I had Java apps that allowed me to set their max memory usage. I set them to cumulatively be 96 GB and used the last 32 GB for cache and other system programs. I only setup a 16GB swap as I recall. That would allow rarely used code pages to be pushed to swap and use that ram for cache instead. Lots of cache can be a great thing for some workloads.
Greg Hi If needed there is always the zram kernel module? http://en.wikipedia.org/wiki/ZRam
-- Cheers Malcolm °¿° (Linux Counter #276890) openSUSE 12.3 (x86_64) Kernel 3.7.10-1.16-desktop up 1 day 14:15, 5 users, load average: 0.25, 0.14, 0.10 CPU AMD Athlon(tm) II P360@2.30GHz | GPU Mobility Radeon HD 4200 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Lew Wolfgang wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
I would allocate 4Gb. -- Per Jessen, Zürich (19.3°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2013-06-26 at 07:12 -0700, Lew Wolfgang wrote:
So, any opinions on swap size in relation to RAM?
As much as you need ;-) How much do I need? Good question. Anything from none to 10 times the ram. If you are going to hibernate the machine you need a bit more than ram. Swap can also be used to push there unneeded blocks, so that you end with more free ram. Use, say, 4 GiB. To say something ;-) You can set some, use the machine for some time, and watch how much swap, if any, is used. Then redo the partitioning if necesary. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHLBH0ACgkQtTMYHG2NR9Xk6ACeLQGJwoKqYFEoYtOvpKMaU58/ TEgAn1V7WRTTndIHgkr9AtYaIn0JApaI =tZlz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
You can set some, use the machine for some time, and watch how much swap, if any, is used. Then redo the partitioning if necesary.
Or just use a swap file. I believe Linux still supports that. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2013-06-26 at 11:22 -0400, James Knott wrote:
Carlos E. R. wrote:
You can set some, use the machine for some time, and watch how much swap, if any, is used. Then redo the partitioning if necesary.
Or just use a swap file. I believe Linux still supports that.
Not for hibernation. You can do it, but not esily. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHLU3YACgkQtTMYHG2NR9XHRgCeKCnU5Mlfs+38Mcc2nCHkTso3 mUQAn1R9FRb3dwDe7b0eO1/N402aZ2Mt =EtJX -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/26/2013 04:12 PM, Lew Wolfgang wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
I'd add 8 or 16GB. Okay, the system would be sloooow when it starts to swap, e.g. if a process goes wild, but better slooow and having the chance to fix/kill that process than letting the kernel kill random processed - maybe you can't even login anymore (e.g. if you're using it remotely most of the time). But as the other's say: it's depending on the application. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
This system runs 6 web browsers loaded with more tabs than can be identified by the miniscule visible text they contain, email, 2 IRC apps, and several other apps 24/7 with 4GB RAM and 0 enabled dedicated HD swap space. Occasionally when working with large A/V files I see disk cache shrink to less than 15% or so, but usually more RAM is used by cache than any single application. Uptime is currently 19 days and cache is 35% of total RAM. If swap is ever actually needed, the kernel will swap to /. With 64GB RAM, I find it difficult to imagine need for non-zero arbitrary allocation of dedicated swap space for a system that won't be hibernated. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2013-06-26 at 12:34 -0400, Felix Miata wrote:
If swap is ever actually needed, the kernel will swap to /.
Are you sure of that? It is the first time I read of that... - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHLVF8ACgkQtTMYHG2NR9X2HACdFNne31leIQPZmxAaowlV8aq3 GfMAn0lBfOv7XMd1lK5ETjIDAoKfrV09 =gdkf -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----Original Message----- From: Carlos E. R. <robin.listas@telefonica.net> To: OS-en <opensuse@opensuse.org> Subject: Re: [opensuse] How Much Swap? Date: Wed, 26 Jun 2013 22:51:43 +0200 (CEST) On Wednesday, 2013-06-26 at 12:34 -0400, Felix Miata wrote:
If swap is ever actually needed, the kernel will swap to /.
Are you sure of that? It is the first time I read of that... -----Original Message----- Strange indeed: It would imply that the kernel destroys its own root... afaicr, if no swap is defined, and it is _really_ needed, OOM comes along and starts shooting processes. But even before that happens, foreground processes, doing an unsuccessful malloc should retry or commit suicide These two i've seen often enough: 1GB mem system, kde + evolution + firefox => OOM -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-06-27 at 00:58 +0200, Hans Witvliet wrote:
From: Carlos E. R. <> On Wednesday, 2013-06-26 at 12:34 -0400, Felix Miata wrote:
If swap is ever actually needed, the kernel will swap to /.
Are you sure of that? It is the first time I read of that... -----Original Message-----
Strange indeed: It would imply that the kernel destroys its own root...
It could be done, if the kernel automatically creates a temporary swapfile in /tmp. But I have never heard of such a thing.
afaicr, if no swap is defined, and it is _really_ needed, OOM comes along and starts shooting processes.
Yep. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlHLleoACgkQtTMYHG2NR9UrTACgine1d2EJG9RCGd6GZUfVgUHu 6EIAn0DFJdueMxP8xQrTudMgJA2FIG4J =zxyz -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 26/06/13 10:12, Lew Wolfgang escribió:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
Unless the 64 GB RAM boxes are really, really busy I do not think you need swap. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/26/2013 10:04 AM, Cristian Rodríguez wrote:
El 26/06/13 10:12, Lew Wolfgang escribió:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
Unless the 64 GB RAM boxes are really, really busy I do not think you need swap.
We've "tuned" the four Gig-E interfaces to input 950-Mbits/sec continuously. The boxes don't have to do very much except hand the thousands of 4-GB files off to the RAID controller. So throughput will be close to 500-MB/sec. I've measured a continuous record rate of 1.6-GB/sec to the RAID, so we shouldn't have any issues. Hibernation won't ever happen. I think I'll try it with 4-GB of swap and see what happens. Even if we had 64-GB of swap, considering our requirements, any serious swap usage would kill us anyway. Thanks for all the suggestions! Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----Original Message----- From: Lew Wolfgang <wolfgang@sweet-haven.com> Reply-to: wolfgang@sweet-haven.com To: OS-en <opensuse@opensuse.org> Subject: [opensuse] How Much Swap? Date: Wed, 26 Jun 2013 07:12:53 -0700 Hi Folks, Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible. As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full. So, any opinions on swap size in relation to RAM? -----Original Message----- Indeed Lew, that amount of swap would be rediculous. However, still swap area should be considered as a "safety-lane" So keep one of a couple a gigs and turn the "swappiness" of the system low (5). Often it is "60", see: /proc/sys/vm/swappiness -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ever since machines had 4G or more I stopped configuring any swap at all. I have had zero swap on any server or desktop in years. For that matter I don't have any swap on my 1G and 2G netbook and ultraportable either. -- bkw On 6/26/2013 10:12 AM, Lew Wolfgang wrote:
Hi Folks,
Back in the '80s we configured swap space to be 1.5 x RAM as a rule of thumb. But I'm configuring 6 boxes now that contain 64-GB of RAM and I'm wondering if swap should be anything close to 96-GB. The boxes have only 128-GB of SSD for the operating system, so I'd like to minimize swap as much as possible.
As background, these devices will be used as dedicated data acquisition devices. They will pump data from four Gig-E Ethernet ports and store it all in a 24-disk RAID-6 array. Preliminary measurements show we should be able to maintain continuous throughput until the RAID is full.
So, any opinions on swap size in relation to RAM?
Thanks, Lew
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (14)
-
Bernhard Voelker
-
Brian K. White
-
Carl Fletcher
-
Carlos E. R.
-
Christopher Myers
-
Cristian Rodríguez
-
Doug
-
Felix Miata
-
Greg Freemyer
-
Hans Witvliet
-
James Knott
-
Lew Wolfgang
-
Malcolm
-
Per Jessen