public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Uwe Thiem <uwix@iway.na>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How many GB for / partition?
Date: Thu, 23 Feb 2006 15:55:18 +0200	[thread overview]
Message-ID: <200602231555.18509.uwix@iway.na> (raw)
In-Reply-To: <28958.1140696299@www077.gmx.net>

On 23 February 2006 14:04, jarry@gmx.net wrote:
> "joaoemanuel1981" <joaoemanuel1981@uol.com.br> wrote:
> > Do i not understand why needs swap, if have 1GB of RAM?
>
> 1. because if you have 200GB disk, cutting 1 or 2GB for swap does not
> matter

True.

>
> 2. because someone told me some apps want to allocate swap no matter how
> ram you have (I think it was someone from hp-ux support, but I'm not sure
> if this is true for linux)

This is a myth. *No* application (under linux) can grab swap space directly. 
Applications ask the kernel for memory when they allocate it. The kernel, 
based on algorithms that balance free real ram, buffers and cache, returns 
either real ram as memory to the app or - if it is low on real ram - swap 
space. So what you do when adding swap space is extending your (fast) real 
ram with (slow) memory residing on your harddrive.

>
> 3. because it is always better to have too much ram/swap then too little
Nnnnot always. There are circumstances when you do not want swap at all. 
Consider a box that has certain real time response requirements which cannot 
be met if apps are swapped out (actually parts of their code and/or data 
paged out) to the harddrive. In these cases, you do not want swap but enough 
ram to accommodate your running processes at all times.

This and 2. also mean that it's quite pointless to add swap if your 
workstation has 16GB of ram and isn't used for image processing or other 
extremely memory-hungry tasks.
>
> 4. because if you do not set up swap, but need it later, it will not be so
> easy to create it, if you partition all disk and leave no space left

The times when we couldn't resize partitions under linux without holding our 
breath are over.
 
>
> 5. because it is a good *nix habit! :-)

What does or does not constitute good *nix habits is at least debateable. 

If I needed a box that was fast at all times and (logical AND) money was of no 
concern I'd put real ram in until the bugger stopped using swap space and 
forget about swap. Since I do have to take monetary issues into 
consideration, I rather configure some (cheap and slow) swap and have less 
(expensive, compared to harddrive space, and fast) ram. How much ram and how 
much swap is an economic question.

It all boils down to how and what for you use your box. If you need more 
memory than you have ram, are you willing to invest the money for more ram? 
No? Then you need swap.

There are too damn many myths about swap out there. Like this one: Always 
configure twice as much swap as you have ram. Why? Why would I need more swap 
if I increased my ram? You need at least a little bit of swap for peak memory 
usage. Let's look at real numbers. Say, I am a bit low of ram for today's 
computers. I have 256MB ram. For peak usage, I add 128MB swap. I open so many 
applications/documents that the box starts swapping out 20MB. Sure, without 
swap space, I wouldn't have been able to open the last document. But nothing 
makes me stop there. I can as well run out of swap.

If you have 2GB of ram and 2GB of swap your total available memory is 4GB. If 
you need more you have to add either ram or swap. What you add is your choice 
based on your needs for speed and the money you are willing to spend on 
memory. That's it.

End of rant.

Uwe

-- 
Why do consumers keep buying products they will live to curse?
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-02-23 14:04 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23 11:07 [gentoo-user] How many GB for / partition? joaoemanuel1981
2006-02-23 12:04 ` jarry
2006-02-23 13:55   ` Uwe Thiem [this message]
2006-02-23 14:05     ` John Jolet
2006-02-23 14:30     ` Dave Nebinger
2006-02-23 16:03       ` Richard Fish
2006-02-23 16:12         ` Dave Nebinger
2006-02-23 18:07           ` Alexander Skwar
2006-02-23 19:38           ` Uwe Thiem
2006-02-23 14:45     ` Abhay Kedia
2006-02-23 14:53     ` [gentoo-user] <OT> " jarry
2006-02-23 15:22       ` Andrei Slavoiu
  -- strict thread matches above, loose matches on Subject: below --
2006-02-17 22:20 [gentoo-user] " John Jolet
2006-02-16 12:19 Izar Ilun
2006-02-16 12:34 ` Daniel da Veiga
2006-02-16 12:42 ` Neil Bothwick
     [not found]   ` <7ae6f8f0602160450i3d0b3973x437e82ff45c8606e@mail.gmail.com>
2006-02-16 12:51     ` Izar Ilun
2006-02-16 13:06       ` Alexander Skwar
2006-02-16 13:47         ` Neil Bothwick
2006-02-16 14:39           ` Alexander Skwar
2006-02-16 16:17             ` Neil Bothwick
2006-02-16 17:46               ` Alexander Skwar
2006-02-16 18:00                 ` kashani
2006-02-16 20:11                 ` Neil Bothwick
2006-02-16 20:24                   ` Hemmann, Volker Armin
2006-02-17  7:52                   ` Alexander Skwar
2006-02-17  9:41                     ` Neil Bothwick
2006-02-17  1:59           ` Zac Slade
2006-02-17  9:38             ` Neil Bothwick
2006-02-16 14:19         ` Hemmann, Volker Armin
2006-02-16 14:45           ` Alexander Skwar
2006-02-16 15:34             ` Hemmann, Volker Armin
2006-02-16 16:18               ` Alexander Skwar
2006-02-16 18:46                 ` Hemmann, Volker Armin
2006-02-16 19:40                   ` Alexander Skwar
2006-02-16 20:12                     ` Neil Bothwick
2006-02-16 21:07                       ` Richard Fish
2006-02-16 23:37                         ` Neil Bothwick
2006-02-17  6:02                       ` Alexander Skwar
2006-02-17  7:14                       ` Uwe Thiem
2006-02-16 20:23                     ` Hemmann, Volker Armin
2006-02-17  6:33                       ` Alexander Skwar
2006-02-17 18:04                         ` Hemmann, Volker Armin
2006-02-17 18:19                           ` Richard Fish
2006-02-17 18:38                             ` Alexander Skwar
2006-02-17 19:18                               ` Benno Schulenberg
2006-02-17 19:41                                 ` Daniel da Veiga
2006-02-17 22:15                               ` Hemmann, Volker Armin
2006-02-17 18:35                           ` Alexander Skwar
2006-02-17 22:15                           ` Patrick Börjesson
2006-02-17 23:48                             ` Hemmann, Volker Armin
2006-02-17 19:52                         ` Maarten
2006-02-17 21:35                           ` Alexander Skwar
2006-02-17 22:36                             ` Rumen Yotov
2006-02-17 22:56                             ` Neil Bothwick
2006-02-16 14:58           ` jarry
2006-02-16 15:14             ` Robert Crawford
2006-02-16 15:36               ` Hemmann, Volker Armin
2006-02-16 14:47         ` jarry
2006-02-16 13:03 ` Alexander Skwar
2006-02-16 14:14   ` apn
2006-02-16 14:51     ` Alexander Skwar
2006-02-16 15:04       ` Martin Eisenhardt
2006-02-16 15:15         ` John Jolet
2006-02-16 15:29           ` Martin Eisenhardt
2006-02-16 15:10       ` jarry
2006-02-16 15:30         ` Alexander Skwar
2006-02-16 16:09           ` Martin Eisenhardt
2006-02-16 16:21             ` Alexander Skwar
2006-02-16 20:58               ` Martin Eisenhardt
2006-02-16 15:33         ` Martin Eisenhardt
2006-02-16 17:46           ` Jarry
2006-02-16 18:13             ` Alexander Skwar
2006-02-16 15:50         ` Richard Fish
2006-02-16 13:29 ` Emanuele Morozzi
2006-02-16 14:22 ` Hemmann, Volker Armin
2006-02-16 15:02   ` Richard Fish
2006-02-16 15:48     ` Hemmann, Volker Armin
2006-02-16 18:40       ` Richard Fish
2006-02-16 15:33   ` Alexander Skwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602231555.18509.uwix@iway.na \
    --to=uwix@iway.na \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox