FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-18-2008, 01:46 PM
Beartooth Sciurivore
 
Default Memory, swap, and limits

Every new computer I've yet had has begun slowing down soon after
I get it -- probably because I keep several browsers open, with from
several to many tabs each. I've learned long since to make sure each
machine has all the memory it can handle from the git-go, before it ever
reaches my house. And every time I do an install, when I get to
anaconda's partitioning stage, I try to triple the swap; it always
refuses.

Yet the little bar graph that Gnome's System Monitor (2.22.2 on
the present F9 machine; probably the same on all the rest -- I always
upgrade early) puts on my panel seldom shows a total of memory and swap
together much less than 95% in use.

Otoh, I've never gotten anywhere near filling up a hard drive,
except once when I had a testbed machine triple booting three different
distros. So why can't I at least increase the swap space?

--
Beartooth Staffwright, Not Quite Clueless Power User
Remember I know little (precious little!) of where up is.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 01:56 PM
James Kosin
 
Default Memory, swap, and limits

Beartooth Sciurivore wrote:
Every new computer I've yet had has begun slowing down soon after
I get it -- probably because I keep several browsers open, with from
several to many tabs each. I've learned long since to make sure each
machine has all the memory it can handle from the git-go, before it ever
reaches my house. And every time I do an install, when I get to
anaconda's partitioning stage, I try to triple the swap; it always
refuses.


Yet the little bar graph that Gnome's System Monitor (2.22.2 on
the present F9 machine; probably the same on all the rest -- I always
upgrade early) puts on my panel seldom shows a total of memory and swap
together much less than 95% in use.


Otoh, I've never gotten anywhere near filling up a hard drive,
except once when I had a testbed machine triple booting three different
distros. So why can't I at least increase the swap space?


Having TOO much swap space can be a detriment and not an asset.
Usually, the rule of thumb I go by is allocate about 2x the amount of
physical memory installed on the system; for machines with < 1M. This
number will need to approach more or less 1x for machines with 1-2M.
With machines with > 2M; I'm not sure swap space will make much of a
difference, unless you rely on X heavily.


James

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 01:58 PM
"Mikkel L. Ellertson"
 
Default Memory, swap, and limits

Beartooth Sciurivore wrote:
Every new computer I've yet had has begun slowing down soon after
I get it -- probably because I keep several browsers open, with from
several to many tabs each. I've learned long since to make sure each
machine has all the memory it can handle from the git-go, before it ever
reaches my house. And every time I do an install, when I get to
anaconda's partitioning stage, I try to triple the swap; it always
refuses.


Yet the little bar graph that Gnome's System Monitor (2.22.2 on
the present F9 machine; probably the same on all the rest -- I always
upgrade early) puts on my panel seldom shows a total of memory and swap
together much less than 95% in use.


Otoh, I've never gotten anywhere near filling up a hard drive,
except once when I had a testbed machine triple booting three different
distros. So why can't I at least increase the swap space?

I believe there is a limit to the size of a swap partition. I don't
remember what it is. But you can create more then one swap
partition. The system will use them all. You also have the option of
adding a swap file after install. Try this, and see if it helps. But
remember, when you start doing a lot of swapping, the system is
going to slow way down.


Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 03:05 PM
"Mikkel L. Ellertson"
 
Default Memory, swap, and limits

James Kosin wrote:
Having TOO much swap space can be a detriment and not an asset.
Usually, the rule of thumb I go by is allocate about 2x the amount of
physical memory installed on the system; for machines with < 1M. This
number will need to approach more or less 1x for machines with 1-2M.
With machines with > 2M; I'm not sure swap space will make much of a
difference, unless you rely on X heavily.


James

I have never head of a problem of having too much swap space. What
kind of problems does it cause? I know you get system slowdown if
you are doing too much swapping, but that is a different problem
from having too much swap space.


Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 03:20 PM
James Kosin
 
Default Memory, swap, and limits

Mikkel L. Ellertson wrote:

James Kosin wrote:
Having TOO much swap space can be a detriment and not an asset.
Usually, the rule of thumb I go by is allocate about 2x the amount of
physical memory installed on the system; for machines with < 1M.
This number will need to approach more or less 1x for machines with
1-2M. With machines with > 2M; I'm not sure swap space will make
much of a difference, unless you rely on X heavily.


James

I have never head of a problem of having too much swap space. What
kind of problems does it cause? I know you get system slowdown if you
are doing too much swapping, but that is a different problem from
having too much swap space.


Mikkel

Ok,

(1) The operating system has to manage the swap space like it manages
memory space and allocation. The swap space is a big area that has to
be divided up just like the RAM. The OS uses what is commonly called a
page table to accomplish this.
(2) As the memory and or swap space gets used and divided up with the
applications this page table gets larger and larger (don't worry, there
is a limit).


Here is were it takes some understanding, I'm lacking at the moment. To
keep track of everything we have a single page table and a bit
determines if we are talking about physical memory or swap memory. In
the OS; everything (or almost so) uses this page table to look up
virtual addresses and maps them to physical addresses. If the address
is in swap space then a disk access is needed to get to the data;
weather it pages the application back to physical RAM at this point is
really up to the OS, some do and some don't.
This page table has to reside in PHYSICAL RAM somewhere usually to keep
the access time down to a reasonable level. If the page table grows too
large you get issues with the table and lookup issues.


James

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 03:58 PM
Beartooth Sciurivore
 
Default Memory, swap, and limits

On Wed, 18 Jun 2008 08:58:47 -0500, Mikkel L. Ellertson wrote:

> Beartooth Sciurivore wrote:
[...]
>> Otoh, I've never gotten anywhere near filling up a hard drive,
>> except once when I had a testbed machine triple booting three different
>> distros. So why can't I at least increase the swap space?
>>
> I believe there is a limit to the size of a swap partition. I don't
> remember what it is. But you can create more then one swap partition.
> The system will use them all. You also have the option of adding a swap
> file after install. Try this, and see if it helps. But remember, when
> you start doing a lot of swapping, the system is going to slow way down.

OK; but then there's something else I don't know, or don't
understand. Does a Fedora machine do any swapping while it has memory
left? I didn't think I had (or needed) any control at all over swapping,
beyond choosing how much space to afford it.

--
Beartooth Staffwright, Not Quite Clueless Power User
Remember I know little (precious little!) of where up is.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 04:06 PM
"Mikkel L. Ellertson"
 
Default Memory, swap, and limits

Beartooth Sciurivore wrote:


OK; but then there's something else I don't know, or don't
understand. Does a Fedora machine do any swapping while it has memory
left? I didn't think I had (or needed) any control at all over swapping,
beyond choosing how much space to afford it.


What I have seen is that when the system needs memory, it will swap
out idle programs, and it will leave them swapped out until they are
needed again. (This is a somewhat simplified explanation...) It will
even use freed memory for thing like disk cache instead of swapping
the programs back in.


Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 04:50 PM
Rick Stevens
 
Default Memory, swap, and limits

Beartooth Sciurivore wrote:

On Wed, 18 Jun 2008 08:58:47 -0500, Mikkel L. Ellertson wrote:


Beartooth Sciurivore wrote:

[...]

Otoh, I've never gotten anywhere near filling up a hard drive,
except once when I had a testbed machine triple booting three different
distros. So why can't I at least increase the swap space?


I believe there is a limit to the size of a swap partition. I don't
remember what it is. But you can create more then one swap partition.
The system will use them all. You also have the option of adding a swap
file after install. Try this, and see if it helps. But remember, when
you start doing a lot of swapping, the system is going to slow way down.


OK; but then there's something else I don't know, or don't
understand. Does a Fedora machine do any swapping while it has memory
left? I didn't think I had (or needed) any control at all over swapping,
beyond choosing how much space to afford it.


The portion of a process' code that is to be executed must be in RAM,
along with any data structures it may need (unless they're the
un-mmap(2)d parts of files). If there is inadequate contiguous space
in RAM, idle processes will be swapped out to the swap space until there
is sufficient contiguous RAM to load the required code and data
structures for the process in question.

If your RAM is heavily fragmented or heavily used, the system may find
it difficult to locate adequate contiguous RAM and spend a lot of time
swapping things to disk and back as tasks compete for the free RAM.

The free(1) program can show a 10,000-foot view of your memory. The
output of vmstat(8) is quite useful. I use "vmstat 5" to get 5-second
snapshots of what is going on. The "si" (swap in) and "so" (swap out)
columns tell you how many swap operations are occuring during the
sample. If you see a lot, you're either running a lot of programs or
your memory is fragged. Also pay attention to the "cs" (context
switches) column. That tells you how often during the sample your
machine gave time slices to processes on the run queue. A high number
indicates a lot of programs competing for space.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer rps2@nerd.com -
- Hosting Consulting, Inc. -
- -
- To err is human, to moo bovine. -
----------------------------------------------------------------------

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 05:04 PM
"Patrick O'Callaghan"
 
Default Memory, swap, and limits

On Wed, 2008-06-18 at 11:06 -0500, Mikkel L. Ellertson wrote:
> > OK; but then there's something else I don't know, or don't
> > understand. Does a Fedora machine do any swapping while it has
> memory
> > left? I didn't think I had (or needed) any control at all over
> swapping,
> > beyond choosing how much space to afford it.
> >
> What I have seen is that when the system needs memory, it will swap
> out idle programs, and it will leave them swapped out until they are
> needed again. (This is a somewhat simplified explanation...) It will
> even use freed memory for thing like disk cache instead of swapping
> the programs back in.

This can be noticeable if you leave a session logged in all night and
your system runs updatedb at 3am, causing all your idle processes to be
swapped out. You then find the system really slow for a minute or two in
the morning as it drags images back in.

To be fair, I've noticed this a lot less with recent versions of Fedora.
Maybe I just have more RAM :-)

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 06-18-2008, 05:22 PM
"Patrick O'Callaghan"
 
Default Memory, swap, and limits

On Wed, 2008-06-18 at 09:50 -0700, Rick Stevens wrote:
> The portion of a process' code that is to be executed must be in RAM,
> along with any data structures it may need (unless they're the
> un-mmap(2)d parts of files). If there is inadequate contiguous space
> in RAM, idle processes will be swapped out to the swap space until
> there
> is sufficient contiguous RAM to load the required code and data
> structures for the process in question.

Why contiguous? Every modern system uses paged memory. Most systems
probably never swap entire processes in the normal run of things (i.e.
except when seriously overloaded), they just move pages in and out.

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 05:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org