Re: How do I determine appropriate swapspace settings? And other partitioning questions.

From: J.O. Aho (user_at_example.net)
Date: 02/09/05


Date: Wed, 09 Feb 2005 00:29:11 +0100

Morningdew wrote:
> Paul Sherwin wrote:

> Yes, here I am with just shy of a gig. But I should not that besides
> the new hard disk coming soon, I *have* been having problems with
> memory, even at a Gig. Yeah, I know it seem ridiculous. Even with what
> I would figure to be a "light" load running under Gnome I am sitting at
> 89% memory use, of which 53% is cache. Now 53% of the 89% or 53 _of_
> the 89% is ambiguous in gnome-system-monitor. But, still... What is
> that Cache? HDD cache? Why does that accumulate rather than flush? If
> I have a power outage with that much cache sitting in RAM won't I be
> likely to foul up a partition? I guess that'll put the journals to the
> test. But dang, I am just sitting here typing and it won't go down.

Cache is used to store data that can be used many times, so instead of loading
everything from harddrive you may have a copy in ram, which makes it faster to
load next time you start. Eg, you start mozilla, parts of it will be cached,
you turn off mozilla, next time you start (assuming the cache isn't
overwritten), it will start a lot faster as parts of it is already in ram.

Sooner or later you will come to a point where the whole memory is used
(mostly by cache), at that point there will be part of the cache overwritten
with more important/relevant data.

As long as you don't use XFS as your filesystem, you don't have to worry about
the filesystem to being stored in RAM, if you use XFS, then you will have
parts of the filesystem in RAM and you will get corruptions if you cut the
power to the computer, XFS are mainly used where you need high speed and where
you have the original data stored on another filesystem (common in video editing).

> See, at least three times now I have had my system schitzotically freeze
> up on me when that memory ticker hit 100%. It starts to "stutter", then
> gets to where I get a half-second of life between 30-second to several
> minute seizures. Even at a console, outside of X. Firefox with lots of
> tabs was part to blame once. Totem running a downloaded SWF another
> time. Come to find out that on my 32-bit install, I didn't have either
> swap partition in the /etc/fstab file. I fixed that but have not maxed
> out to reproduce the problem yet. I'm sure I'll get to test with the
> swap space soon, though.

If you run out of RAM and don't have SWAP, then you run into trouble, I think
you won't notice things as much next time you max out.

> Oh, and I, like, re-posted this message a few times because it was not
> showing up for me. I tried cutting down some of the cross-posts, and
> finally cut back the subject line and got it to post. Heh... of course
> it seems you got at least one of them on your nntp server that mine
> didn't want to show, 'cuz you replied and I don't see the original. Way
> to go Charter Communications. Your NNTP service is not only slow, it
> also bites.

Depending on your ISP/NGP, it can take a while before you see a post, even
your own, to appear on the newsgroups... Some have built in "spam" detectors
and will filter away posts and in those cases you won't see the "offending"
post at all (nothing is perfect, so valide mail can be filtered away too).

  //Aho



Relevant Pages

  • Re: speeding up my runtime on a c6713.
    ... it for cache, and possibly enabled the cache controller? ... I ran out of IRAM memory so I moved all my variables to ERAM. ... "Are you using all 256k of DSP ram, or have you reserved up to 64k of ...
    (comp.dsp)
  • Re: Scheduler: Process priority fed back to parent?
    ... > interactivity cache could estimate interactivity over a period of hours ... Then you don't even have to write it to the filesystem. ... For those of us with enough memory or a large variety of programs, ... That way the file is already in disk cache or on its way when the ...
    (Linux-Kernel)
  • Re: RFC: CONFIG_PAGE_SHIFT (aka software PAGE_SIZE)
    ... but now we waste more memory on small files.... ... allowing us to increase the fundamental block size of the filesystem. ... _whole_ kernel faster. ... If I want a inode cache, it always needs to be 8k based. ...
    (Linux-Kernel)
  • Re: speed of int vs bool for large matrix
    ... >>as much data that will fit the Level 1 cache. ... I am not speaking about file I/O but RAM I/O. ... Memory access go through the bus at 300 MHZ, ...
    (comp.lang.c)
  • Re: Geriatric Pentium
    ... processor scavenging spare ram cycles to back it up to ram and restore ... Note that if it stores something the cache is of course ... as well as a memory write cycle occurring. ... Program load is close to that now. ...
    (comp.lang.java.advocacy)