Re: [SLUG] Oddball memory usage?
Actually, si and so refer to entire processes being swapped, not paging traffic, so they'll never be non-zero on a modern Linux system. I'm not sure what type of Linux system you're using, but this is not true at least for what's in front of me (FC6) $ vmstat 1 1 procs ---memory-- ---swap-- -io --system-- -cpu-- r b swpd free buff cache si sobibo in cs us sy id wa st 7 0 127804 20536 5324 19408400 0 0 628 2902 3 2 95 0 0 9 0 127804 21436 5324 19408400 0 0 624 2989 5 2 93 0 0 5 0 127804 21592 5324 19409200 8 8 763 4296 9 2 89 0 0 9 0 127804 21592 5324 19409200 0 0 732 3487 4 2 94 0 0 no problem here, lets start loading some memory hungy java apps + OOo: procs ---memory-- ---swap-- -io --system-- -cpu-- r b swpd free buff cache si sobibo in cs us sy id wa st 7 1 133288 17172 2888 18066400 1812 0 887 5248 19 10 0 71 0 11 2 133340 15504 2948 1830480 68 6940 214 912 5036 20 11 0 69 0 11 2 134112 18284 2768 1815120 4192 4364 4288 899 4763 33 18 0 50 0 5 1 134620 18320 2796 1821720 552 2436 552 891 4139 28 13 0 59 0 procs ---memory-- ---swap-- -io --system-- -cpu-- r b swpd free buff cache si sobibo in cs us sy id wa st 10 1 134620 14632 2812 18572000 3568 0 1003 4102 53 11 0 36 0 12 0 136184 16424 2844 186920 32 1564 2152 1564 904 4112 87 9 0 4 0 3 1 136184 15764 3032 187588 920 93212 920 3753 73 4 0 23 0 5 1 141548 18784 3156 187160 64 5848 296 5848 944 6262 65 9 0 26 0 blocks are swapped out, as we should expect.. this gets boring pretty quick, but yes, lots of blocks are swapped out, so lets start quitting: procs ---memory-- ---swap-- -io --system-- -cpu-- r b swpd free buff cache si sobibo in cs us sy id wa st 5 3 206088 320832 4872 178240 30400 481228 867 1789 7 5 0 88 0 4 1 206088 316068 4872 178228 48120 4812 0 904 2477 12 3 0 85 0 3 0 206088 310436 4880 178224 62960 629612 963 2121 16 3 0 81 0 2 0 175776 384348 4884 178224 11520 119230 847 2744 24 3 59 14 0 procs ---memory-- ---swap-- -io --system-- -cpu-- r b swpd free buff cache si sobibo in cs us sy id wa st 2 0 175776 384420 4892 17822000 044 587 1436 2 4 94 0 0 2 0 175776 384420 4900 17821200 086 564 1437 2 0 98 0 0 2 0 175776 384472 4904 17831600 10013 662 1640 1 1 96 2 0 blocks are swapped back in, as expected On 2/25/07, Peter Chubb [EMAIL PROTECTED] wrote: Sonia == Sonia Hamilton [EMAIL PROTECTED] writes: Sonia * On Thu, Feb 22, 2007 at 04:16:04PM +1100, Peter Hardy wrote: Sonia correct me if I'm wrong vmstat is your friend. A figure Sonia consistently 0 for the so column (swap out) often indicates Sonia problems. My understanding is the memory manager in 2.6 will Sonia use a lot of swap on purpose. /correct me if I'm wrong $ vmstat 5 5 procs ---memory-- ---swap-- -io --system-- cpu r b swpd free buff cache si sobibo incs us sy id wa 0 0 65580 12984 155944 30252000 5 83 2 11 1 86 2 Actually, si and so refer to entire processes being swapped, not paging traffic, so they'll never be non-zero on a modern Linux system. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
zhasper == zhasper [EMAIL PROTECTED] writes: zhasper On 22/02/07, Howard Lowndes [EMAIL PROTECTED] wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x zhasper Blanket statement != useful. Depends on what *else* you're using swsap for. If you want suspend to disk, then it's useful to have swap = ram. If you want one of the crashdump variants that saves its dump to swap, you need 2xRAM. Otherwise, not. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
Sonia == Sonia Hamilton [EMAIL PROTECTED] writes: Sonia * On Thu, Feb 22, 2007 at 04:16:04PM +1100, Peter Hardy wrote: Sonia correct me if I'm wrong vmstat is your friend. A figure Sonia consistently 0 for the so column (swap out) often indicates Sonia problems. My understanding is the memory manager in 2.6 will Sonia use a lot of swap on purpose. /correct me if I'm wrong $ vmstat 5 5 procs ---memory-- ---swap-- -io --system-- cpu r b swpd free buff cache si sobibo incs us sy id wa 0 0 65580 12984 155944 30252000 5 83 2 11 1 86 2 Actually, si and so refer to entire processes being swapped, not paging traffic, so they'll never be non-zero on a modern Linux system. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, 22 Feb 2007 16:16:04 +1100, Peter Hardy uttered I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. I might be barking up the wrong tree, but do you have one or more tmpfs'es that are full of files? tmpfs is swap-backed RAM, which neatly explains the completly full swap, and also the fact that vmstat doesn't report any swapping at all. Cheers, -- Steve E-mail is for geeks and paedophiles. - Sebastian, Cruel Intentions -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
* On Fri, Feb 23, 2007 at 03:05:05PM +1100, Amos Shapira wrote: On 23/02/07, Peter Hardy [EMAIL PROTECTED] wrote: IBM do a good book on Linux Performance Tuning, which explains this well. Oh, cool. I'll have to add it to my reading list. Thanks. I was looking for a link to include in a to read list when I found the following review: http://www.linuxjournal.com/article/8516 Thanks for that. Performance Tuning for Linux Servers (ISBN 0-13-144753-X) has some problems. The biggest problem I found is it was written by many authors--more than 20--and it reads that way. Information often is repeated and sometimes in contradictory ways, I've got the book and agree - perhaps go for the other book. -- Sonia Hamilton. GPG key A8B77238. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On 22/02/07, Peter Hardy [EMAIL PROTECTED] wrote: On Thu, 2007-02-22 at 16:24 +1100, Zhasper wrote: On 22/02/07, Peter Hardy [EMAIL PROTECTED] wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. You're running Linux, right? Aye. It's a 2.4 kernel dating from somewhere before swappiness became tuneable. This can be really great on a system with not much ram where large apps that you haven't used in a while (eg, OOo) will get swapped out when they're not being used, to make lots of space to cache all the pr0^H^H^Himages of your grandmother's birthday party that you're scanning through agressively.. In my rush to be as detailed as possible, I completely forgot to mention what the machine in question is actually doing. Well, it's a web server for a single (fairly high-traffic) domain. Apart from apache and the web application software, there's nothing running on it apart from the usual collection of processes that are essential to a well behave unix system. init, crond, syslogd. I'd be looking at top (or other tools which give similar output), particular at the RES and VIRT columns. VIRT shows the total amount of memory used by a process; RES shows the amount of that that's located in RAM (the rest has been swapped out) Given what you said, my two-seconds-thought-while-sitting-in-armchair hunch is that Apache (or more likely, come CGI you're using) does have some kind of memory leak, and is slowly gobbling ram - but the kernel is smart enough to see that the pages, although claimed, are unused, so it's swapping them. I would also guess that your site either has a lot of static content which, rather than being read from disk a lot, the kernel is caching in ram. You mentioned web application software, so it could be files used by that too - config files, databases, etc. Check your RRDTool graphs to see if swap/memory usage has been growing over time - particular that really handy graph that differentiates between buffers/cache/actually-used-by-applications ram usage, so that you can see if, perhaps, the amount of used and buffers/cache have remained about the same, while swap usage has been creeping up I think I'm agreeing with everyone else - the kernel usually does a pretty good job of handling the balance between buffers/cache and application ram. If you're seeing performance issues, check sar/iostat/vmstat/similar to see if there's a lot of swapping happening; if that's the case, you might have a problem. If there's a lot of disk IO that's not swapping, you might have the opposite problem - not enough swapped out to cache all the frequently used files. Either way, extra ram should help a lot, and extra swap may help out as well - allow more files to be cached, at the expense of infrequent extreme performance issues as those files get dumped from ram as the system frantically swaps pages back in... The other possibility is that you actually do have a memory leak, which is going to be a lot of fun. As always, monitoring is your friend... Looking at the output of free tells you what the system is like now, looking at historical trends tells you how it got there - whether this is a normal condition, something that has gradually arisen, or something that abruptly occured overnight... This is easily the biggest system I've found myself responsible for, and the way the memory's been allocated doesn't line up with anything else I've seen before. Just curious as to how and why it's being used like this. -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
Peter Hardy [EMAIL PROTECTED] writes: On Thu, 2007-02-22 at 16:24 +1100, Howard Lowndes wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Has anybody seriously made such a recommendation this millenium? early 2.4 kernels, linus, alan, rik, etc, said at least double the swap was needed, especially with big uptimes. It changed somewhere in 2.4 where it was no longer needed, but I think people like red hat took a while before they trusted and used the new code. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
RE: [SLUG] Oddball memory usage?
Peter Hardy wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Has anybody seriously made such a recommendation this millenium? It was only briefly a good recommendation for Windows 95, which I recall ran slower when physical ram + swap went over 64Mb. If you had 64Mb, win 95 would run fastest with no swap space at all, yet the popular wisdom of best swap size = 2x physical just wouldn't die. There is no substitute for empirical testing. Adelle. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
I think you'll find the formula dated to the time when most people said I really need my total memory address space to be n megabytes, but I can only possibly afford n/3 megabytes of RAM, so I have to just make do with 2n/3 being on a relatively slow hard disk. This certainly applied when I maxed out my first PC, a 486/33 with 8MB RAM back in 1993 [1]. Just being able to run 16MB of RAM+swap using SLS [2] was heaven. I could have allocated more swap but I could only afford a 210MB hard disk (and I reckon adding any more swap would have been pretty much been counter-productive.). Regards, Martin [1] For those of you into Linux nostalgia, I actually posted a question on one of the NNTP newsgroups on how to share my Linux swap space with Windows 3.1. (Google groups has the memory of an elephant - http://groups.google.com.au/group/comp.os.linux.help/browse_thread/thread/7f6d399f350a6eee/710993141162f89b?lnk=stq=martin.m.c.visser+linuxrnum=1#710993141162f89b ) [2] http://en.wikipedia.org/wiki/Softlanding_Linux_System On 2/22/07, Howard Lowndes [EMAIL PROTECTED] wrote: Michael Chesterton wrote: Peter Hardy [EMAIL PROTECTED] writes: On Thu, 2007-02-22 at 16:24 +1100, Howard Lowndes wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Has anybody seriously made such a recommendation this millenium? early 2.4 kernels, linus, alan, rik, etc, said at least double the swap was needed, especially with big uptimes. It changed somewhere in 2.4 where it was no longer needed, but I think people like red hat took a while before they trusted and used the new code. A default FC install still uses the 2x formula so I guess there must still be some relevance. -- Howard. LANNet Computing Associates - Your Linux people http://lannetlinux.com When you want a computer system that works, just choose Linux; When you want a computer system that works, just, choose Microsoft. -- Flatter government, not fatter government; abolish the Australian states. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, Feb 22, 2007 at 09:57:48PM +1100, Howard Lowndes wrote: Michael Chesterton wrote: Peter Hardy [EMAIL PROTECTED] writes: On Thu, 2007-02-22 at 16:24 +1100, Howard Lowndes wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Has anybody seriously made such a recommendation this millenium? early 2.4 kernels, linus, alan, rik, etc, said at least double the swap was needed, especially with big uptimes. It changed somewhere in 2.4 where it was no longer needed, but I think people like red hat took a while before they trusted and used the new code. A default FC install still uses the 2x formula so I guess there must still be some relevance. interestingly rhel4 (don't use fc) and from what I have seen of rhel5, they still use 2G swap partitions. what we are probably seeing is if it ain't broken don't fix/modify it. -- Howard. LANNet Computing Associates - Your Linux people http://lannetlinux.com When you want a computer system that works, just choose Linux; When you want a computer system that works, just, choose Microsoft. -- Flatter government, not fatter government; abolish the Australian states. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On 23/02/07, Martin Visser [EMAIL PROTECTED] wrote: I think you'll find the formula dated to the time when most people said I really need my total memory address space to be n megabytes, but I can only possibly afford n/3 megabytes of RAM, so I have to just make do with 2n/3 being on a relatively slow hard disk. This certainly applied when I maxed out my first PC, a 486/33 with 8MB RAM back in 1993 [1]. Just being able to run 16MB of RAM+swap I second that theory, only my experience was with BSD 4.2 on VAX machines - there it was exactly that way - you wanted lots of memory so the multiple users running physics simulations for weeks and months won't max it out but you were limited in amount of RAM you could afford or the system could handle, so you allocated swap on your disks. These days, just having to handle too many pages in the swap space could slow the system down (remember - every swap page requires the system to keep some meta data about it in memory and maybe on disk as well, looking for it through the linked lists and such). Also - if you system is so heavy on memory usage that it uses so much swap then it's going to be dog slow anyway and you better find another solution ( e.g. add RAM, have another server, optimize the programs running on it etc). --Amos -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
* On Thu, Feb 22, 2007 at 04:16:04PM +1100, Peter Hardy wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. correct me if I'm wrong vmstat is your friend. A figure consistently 0 for the so column (swap out) often indicates problems. My understanding is the memory manager in 2.6 will use a lot of swap on purpose. /correct me if I'm wrong eg $ vmstat 5 5 procs ---memory-- ---swap-- -io --system-- cpu r b swpd free buff cache si sobibo incs us sy id wa 0 0 65580 12984 155944 30252000 5 83 2 11 1 86 2 ... IBM do a good book on Linux Performance Tuning, which explains this well. -- Sonia Hamilton. GPG key A8B77238. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
Hey hey. On Fri, 2007-02-23 at 14:09 +1100, Sonia Hamilton wrote: correct me if I'm wrong vmstat is your friend. A figure consistently 0 for the so column (swap out) often indicates problems. My understanding is the memory manager in 2.6 will use a lot of swap on purpose. /correct me if I'm wrong That's the way I understand it as well. Ran vmstat over a 15 minute period yesterday that showed no activity at all either in or out of swap. I've been meaning to run it over a longer period today, but with one thing and another I've spent about three minutes actually in front of a computer today. IBM do a good book on Linux Performance Tuning, which explains this well. Oh, cool. I'll have to add it to my reading list. Thanks. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On 23/02/07, Peter Hardy [EMAIL PROTECTED] wrote: IBM do a good book on Linux Performance Tuning, which explains this well. Oh, cool. I'll have to add it to my reading list. Thanks. I was looking for a link to include in a to read list when I found the following review: http://www.linuxjournal.com/article/8516 Cheers, --Amos -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Oddball memory usage?
I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
This one time, at band camp, Peter Hardy wrote: Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. Just trust it. It knows what it's doing. Better minds than ours have worked long and hard on this and they're pretty good add it. Swap not getting hit in 15 minutes sounds like it's doing the right thing. Unless you have some really weird requirements, you should be able to leave it be. If you do wanna tweak/learn: http://linux-mm.org/ -- Rev Simon Rumble [EMAIL PROTECTED] www.rumble.net The ability to quote is a serviceable substitute for wit. - Somerset Maugham -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On 22/02/07, Peter Hardy [EMAIL PROTECTED] wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. You're running Linux, right? As of.. urmm.. somewhere in the 2.4 series, or early in the 2.6 series, I forget where, the kernel developers decided to be very, very aggressive about favoring buffers/cache over unrecently-used pages. This can be really great on a system with not much ram where large apps that you haven't used in a while (eg, OOo) will get swapped out when they're not being used, to make lots of space to cache all the pr0^H^H^Himages of your grandmother's birthday party that you're scanning through agressively.. It's tuneable though, via /proc/sys/vm/swappiness. Quick google search shows the below, from http://beranger.org/index.php?article=1547 (which read, for a more detailed explanation) swappiness is a number between 0 and 100, representing how aggressive the swap policy of the kernel is, or where is the balance between swapping applications and freeing cache. -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, 2007-02-22 at 05:22 +, Rev Simon Rumble wrote: This one time, at band camp, Peter Hardy wrote: Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. Just trust it. It knows what it's doing. Better minds than ours have worked long and hard on this and they're pretty good add it. Swap not getting hit in 15 minutes sounds like it's doing the right thing. Oh, there's absolutely no plans to fiddle with it. But it's a pattern that I've never seen before, and I'm curious about how the memory is being used. And, given the uptime on the machine in question (250 days so far), I'm mildly concerned about very slow memory leaks in the web application it's running. Unless you have some really weird requirements, you should be able to leave it be. If you do wanna tweak/learn: http://linux-mm.org/ Ooo, looks like a pretty good resource. Thanks for the link. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thursday 22 February 2007 14:42, [EMAIL PROTECTED] wrote: I'm a little puzzled by this: total used free shared buffers cached Mem: 5005084 4816352 188732 0 156644 3165540 -/+ buffers/cache: 1494168 3510916 Swap: 1052616 1052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. A perfect example to support my post about memory. More than 1G of your application ram is 'in use' but not being used. Keeping ram for cache where it is used is better than having it occupied and not in-use. Having said that, your example is a little unusual, but without doubt if you explained what you were doing sage heads would say 'cute'. James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On 22/02/07, Howard Lowndes [EMAIL PROTECTED] wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Blanket statement != useful. On a desktop, where I'm putting OOo in the background and letting firefox chew all my ram for a while - yes, I'll take lots of swap. On a high-performance server - I'll spend the extra couple of hundred and get 2x the RAM instead, I don't want the performance hit that swapping implies. I'll probably add some swap in as a bit of a buffer for pathological cases, but if that swap starts being used I'll be worried. Well, I might be, anyway - it would depend on the exact purpose of the machine and its usage patterns. On my N800, where 'swap' means extraneous writes to flash, I'll pass on swap. My point is, swap is not always a good thing, and 2x is not always the right amount. It used to be a decent guideline, for desktop systems, when ram was expensive and most machines had maybe 128mb of ram. These days, when your average desktop comes with 1Gb, and the upgrade to 2Gb is perhaps $150 more at most... well, maybe swap is not so neccessary In this case, Peter hasn't given us enough information - we don't know if he's working with a low-end server, a desktop, a laptop. He's *probably* not working with an embedded device... We don't know what he's doing with the server, and we don't know what it's running. We really don't know if 2xram is an appropriate amount of swap. Peter Hardy wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. -- Howard. LANNet Computing Associates - Your Linux people http://lannetlinux.com When you want a computer system that works, just choose Linux; When you want a computer system that works, just, choose Microsoft. -- Flatter government, not fatter government; abolish the Australian states. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, 22 Feb 2007, Peter Hardy wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. If a background daemon loads a bunch of stuff into memory, but then never accesses those pages, it can get swapped out, in favor of buffering files that *are* being used. This does improve overall performance and is normally useful, though counterintuitive at first. --Jeremy -- /-\ | Jeremy Portzer[EMAIL PROTECTED] trilug.org/~jeremy | | GPG Fingerprint: 712D 77C7 AB2D 2130 989F E135 6F9F F7BC CC1A 7B92 | \-/ -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, 2007-02-22 at 16:24 +1100, Zhasper wrote: On 22/02/07, Peter Hardy [EMAIL PROTECTED] wrote: I'm a little puzzled by this: total used free sharedbuffers cached Mem:50050844816352 188732 0 1566443165540 -/+ buffers/cache: 14941683510916 Swap: 10526161052616 0 Is this sort of usage normal? Filling a gigabyte of swap space while just under 1.5GB of memory is going towards buffers seems odd to me. And vmstat reports no usage of this swap space over a 15 minute period. What sort of utilities are around to analyse swap space? I'd like to get an idea of exactly what's using all of that memory. You're running Linux, right? Aye. It's a 2.4 kernel dating from somewhere before swappiness became tuneable. This can be really great on a system with not much ram where large apps that you haven't used in a while (eg, OOo) will get swapped out when they're not being used, to make lots of space to cache all the pr0^H^H^Himages of your grandmother's birthday party that you're scanning through agressively.. In my rush to be as detailed as possible, I completely forgot to mention what the machine in question is actually doing. Well, it's a web server for a single (fairly high-traffic) domain. Apart from apache and the web application software, there's nothing running on it apart from the usual collection of processes that are essential to a well behave unix system. init, crond, syslogd. This is easily the biggest system I've found myself responsible for, and the way the memory's been allocated doesn't line up with anything else I've seen before. Just curious as to how and why it's being used like this. -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Oddball memory usage?
On Thu, 2007-02-22 at 16:24 +1100, Howard Lowndes wrote: It's recommended that your swap space should be 2x your RAM. In your case it's .2x Has anybody seriously made such a recommendation this millenium? In my experience, the formula doesn't really scale at all. I suppose, in certain limited applications, a huge swap space could come in handy. But I'm yet to see a desktop or server system where more than a gigabyte of swap wasn't just plain ludicrous. As for your suggestion I should have TEN gigabytes of swap space? ...why? -- Pete -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html