Re: [newbie] Lost about swap
> and running out of swap on a running system is *not* something you want > to have happen, ever. It creates quite the headache. That is quite true. A historical anecdote: a friend of mine and early linxu adopter (1993ish) had a 386 dx 4 meg RAM system. Back then it was fairly serviceable - I myself had a working SLS linux install on a packard bell 386sx/16 with 4 megs (later upgrading to 8). At any rate, friend decided not to install a swap partition. Bad move, especially on a machine with not much RAM available. And, my friend was then and still is a rather "casual" and light user of the system, mostly doing editing and so forth using emacs. Well, of course, on a small footprint machine you can barely fit kernel+some deamons+bash+emacs in RAM. Needless to say, he exceeded his resources and his machine seemingly locked up. But he didn't reboot. He hit ctrl-x ctrl-c to quit/save Emacs --- and guess what --- 45 *minutes* later, he got his shell prompt back. Yes, that's right. 45 *minutes*! All that time the kernel (which was likely pre-1.0 then) or more properly, the memory management system, rummaging through pages panicing trying to find room. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
On Mon, 03 Feb 2003 20:27:51 +1300, Jason <[EMAIL PROTECTED]> wrote: > Nope, don't have a link but have read it in several places > before...though with lots of RAM being the norm nowadays, getting away > with less is a real possibility. I double it because HD space is cheap > and running out of swap on a running system is *not* something you want > to have happen, ever. It creates quite the headache. > > Regards, > > Jason > > Adolfo Bello wrote: > > >On Sun, 2003-02-02 at 20:28, Jason Greenwood wrote: > > > > > >>As a rule of thumb, you want your swap partition to be double the size > >>of the amount of ram you have eg 512MB RAM make swap 1+ Gb. > >> > >>Cheers > >> > >>Jason > >> > >> > >Before getting out of Window$ and into GNU/Linux, I read somewhere that > >the more memory you have the less swap space you need and this makes > >sense to me. AFAIK, swap space has to do with the processor paging > >memory to disk to make room for other processes that might be in need of > >it. Being equal the request of memory, the system with more ram will > >need less swap space. > > > >Yesterday was the first time that I saw my system using swap space, but > >I was doing a lot of crap like compiling, database programming, testing > >OO and MyODBC, mail, etc, without taking care of processes that I didn't > >need any longer. > > > >Right now I have an 80 Mb swap partition and have had no problem but I > >would like to read more about the technical foundations for the rule of > >thumb that you mentioned. Any link or reference will be truly > >appreciated. Swap = 2x RAM has been a common equation for a long time now. In fact, 2.4 kernels prior to 2.4.10 required this to be met for proper VM functionality. When it comes down to it, you need enough RAM and swap to cover everything you want to do with your computer. Many of today's computers boast more RAM than you'll ever need, given the current state of GNU/Linux, so you can afford to relax things a little. For example, I have 1GB RAM, which is far more than I'll ever need. I have configured a swap size of 1GB (i.e. swap = RAM), but my system never needs to use it. -- Sridhar Dhanapalan [Yama | http://www.pclinuxonline.com/] "I'm basically a very lazy person who likes to get credit for things other people actually do." -- Linus Torvalds msg117982/pgp0.pgp Description: PGP signature
Re: [newbie] Lost about swap
Nope, don't have a link but have read it in several places before...though with lots of RAM being the norm nowadays, getting away with less is a real possibility. I double it because HD space is cheap and running out of swap on a running system is *not* something you want to have happen, ever. It creates quite the headache. Regards, Jason Adolfo Bello wrote: On Sun, 2003-02-02 at 20:28, Jason Greenwood wrote: As a rule of thumb, you want your swap partition to be double the size of the amount of ram you have eg 512MB RAM make swap 1+ Gb. Cheers Jason Before getting out of Window$ and into GNU/Linux, I read somewhere that the more memory you have the less swap space you need and this makes sense to me. AFAIK, swap space has to do with the processor paging memory to disk to make room for other processes that might be in need of it. Being equal the request of memory, the system with more ram will need less swap space. Yesterday was the first time that I saw my system using swap space, but I was doing a lot of crap like compiling, database programming, testing OO and MyODBC, mail, etc, without taking care of processes that I didn't need any longer. Right now I have an 80 Mb swap partition and have had no problem but I would like to read more about the technical foundations for the rule of thumb that you mentioned. Any link or reference will be truly appreciated. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
At 09:12 PM 2/2/2003 -0400, you wrote: Right now I have an 80 Mb swap partition and have had no problem but I would like to read more about the technical foundations for the rule of thumb that you mentioned. Any link or reference will be truly appreciated. -- No linky for you. Just something I believe Ed Tharp or Tom posted. IIRC swap that is double the size of you RAM was a necessity only in the days when you had 64 or 128 mg of RAM total in your system. Now that 512 or 256mg is common, its less necessary. - FemmeFatale Good Decisions You boss Made: "We'll do as you suggest and go with Linux. I've always liked that character from Peanuts." - Source: Dilbert Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
On Sun, 2003-02-02 at 20:28, Jason Greenwood wrote: > As a rule of thumb, you want your swap partition to be double the size > of the amount of ram you have eg 512MB RAM make swap 1+ Gb. > > Cheers > > Jason Before getting out of Window$ and into GNU/Linux, I read somewhere that the more memory you have the less swap space you need and this makes sense to me. AFAIK, swap space has to do with the processor paging memory to disk to make room for other processes that might be in need of it. Being equal the request of memory, the system with more ram will need less swap space. Yesterday was the first time that I saw my system using swap space, but I was doing a lot of crap like compiling, database programming, testing OO and MyODBC, mail, etc, without taking care of processes that I didn't need any longer. Right now I have an 80 Mb swap partition and have had no problem but I would like to read more about the technical foundations for the rule of thumb that you mentioned. Any link or reference will be truly appreciated. -- __ / \\ @ __ __@ Adolfo Bello <[EMAIL PROTECTED]> / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / <_/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
> Until today, I thought that the swap partition was used *only* when the > system ran out of "real" memory and started to swap proceses or data > from ram to disk and back. That used to be true, I guess, in some versions. But the system can easily same on RAM usage if little-used processes get partially swapped out, since they aren't doing anything but wasting RAM. > However, I've been monitoring memory usage with gkrellm and have noticed > that even when there is still about 200Mb of free ram, the system has > used 20 Mb of swap space. That's perfectly acceptable and commonplace, depending on what you're doing at the time. The system may anticipate that a large amount of RAM may be used. Since you're running gkrellm, I'm assuming you're running a GUI environment (kde or gnome) and those environments use up quite a bit of memory by themselves. Indeed, kde or gmome is a fairly complex system, and once it's up and running, there's already been a lot of process loading and unloading and so forth. And when all that's heppening and you're using the system, Linux is there monitoring usage and trying to maximize your RAM usage. Certain things will affect available memory besides program usage, such as buffers, and an increase in that can easily be triggered by large accesses to files and so forth. > system has used at any time? Is it possible that Linux uses swap space > when there is plenty of free ram? I suppose top would tell you at any time how much RAM is in use. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
On Sat, 2003-02-01 at 19:49, Damian Gatabria wrote: > On Sunday 02 February 2003 01:35, Adolfo Bello wrote: > > Until today, I thought that the swap partition was used *only* when the > > system ran out of "real" memory and started to swap proceses or data > > from ram to disk and back. > > This is probably correct. > > > However, I've been monitoring memory usage with gkrellm and have noticed > > that even when there is still about 200Mb of free ram, the system has > > used 20 Mb of swap space. > > It is possible that at one point you did use up all of your RAM and some > processes got swapped out, but later, when some memory is freed, > swapped-out segments do not get loaded into memory again until needed. > > > Is there any tool that can tell me the maximum amount of memory the > > system has used at any time? > > You mean like a log? You could probably set one up by yourself, running > 'free' once every half an hour or so and piping it's output to file (thinking > about a cron job..) > > >Is it possible that Linux uses swap space > > when there is plenty of free ram? > > don't know, but don't think so. > > > Damian As I have 512 Mb ram, I selected a small swap partition so I was a bit uneasy when I saw that about half of it had been used. I suppose that at some moment I might have been using lot of memory because I was compiling/building stuffs, using Evolution, OpenOffice, PAN, Galeon, Konq and Konsole, trying ODBC with MySQL, every thing under KDE. Hate buying more memory but no more than disk swapping :-( -- __ / \\ @ __ __@ Adolfo Bello / [EMAIL PROTECTED] / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / <_/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) Sat, 01 Feb 2003 23:20:21 -0400 11:20pm up 15:31, 3 users, load average: 0.00, 0.02, 0.00 "When it comes to humility, I'm the greatest." -- Bullwinkle Moose Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Lost about swap
On Sunday 02 February 2003 01:35, Adolfo Bello wrote: > Until today, I thought that the swap partition was used *only* when the > system ran out of "real" memory and started to swap proceses or data > from ram to disk and back. This is probably correct. > However, I've been monitoring memory usage with gkrellm and have noticed > that even when there is still about 200Mb of free ram, the system has > used 20 Mb of swap space. It is possible that at one point you did use up all of your RAM and some processes got swapped out, but later, when some memory is freed, swapped-out segments do not get loaded into memory again until needed. > Is there any tool that can tell me the maximum amount of memory the > system has used at any time? You mean like a log? You could probably set one up by yourself, running 'free' once every half an hour or so and piping it's output to file (thinking about a cron job..) >Is it possible that Linux uses swap space > when there is plenty of free ram? don't know, but don't think so. Damian -- -- I don't want Windows to be only for the 31173. Yes, we've come a long way from all those security holes, virii, and cryptic commands like "Edit textfile.txt" (what in the hell is that supposed to mean?) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] Lost about swap
Until today, I thought that the swap partition was used *only* when the system ran out of "real" memory and started to swap proceses or data from ram to disk and back. However, I've been monitoring memory usage with gkrellm and have noticed that even when there is still about 200Mb of free ram, the system has used 20 Mb of swap space. Is there any tool that can tell me the maximum amount of memory the system has used at any time? Is it possible that Linux uses swap space when there is plenty of free ram? -- __ / \\ @ __ __@ Adolfo Bello <[EMAIL PROTECTED]> / // // /\ / \\ // \ // Bello Ingenieria S.A, ICQ: 65910258 / \\ // / \\ / // // / //cel: +58 416 609-6213 /___// // / <_/ \__\\ //__/ // fax: +58 212 952-6797 www.bisapi.com //pager: www.tun-tun.com (# 609-6213) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com