* Re: [gentoo-user] How many GB for / partition?
@ 2006-02-23 11:07 joaoemanuel1981
2006-02-23 12:04 ` jarry
0 siblings, 1 reply; 12+ messages in thread
From: joaoemanuel1981 @ 2006-02-23 11:07 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
> IMHO you could just use the rest of the disk (after the /boot [hda1]
> and swap [hda2]), but if you intend to get a /home (or anything), I
> usually use 10GB for / just in case (still at 50%, but you never
> know). I got two 40GB disks however, if I were you (and I'm not, so,
> you can just disconsider what I'll say), I would put 20GB for the
> system, so you'll probably never run out of space...
>
> On 2/16/06, Izar Ilun wrote:
> > I'm installing Gentoo and I'd like you to suggest me how much disc space I
> > should use for /.
> >
> > My machine is Pentium4, 1GB RAM, 200 GB HD ATA
> >
> > It's a desktop machine with Gentoo as the only and exclusive OS.
> >
> > Will run KDE. Amarok, OpenOffice, firefox....
> >
> > Thanx!
> >
>
>
> --
> Daniel da Veiga
> Computer Operator - RS - Brazil
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
> PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
> ------END GEEK CODE BLOCK------
>
> --
> gentoo-user@gentoo.org mailing list
Do i not understand why needs swap, if have 1GB of RAM?
[-- Attachment #2: Type: text/html, Size: 1775 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
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
0 siblings, 1 reply; 12+ messages in thread
From: jarry @ 2006-02-23 12:04 UTC (permalink / raw
To: gentoo-user
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 843 bytes --]
"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
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)
3. because it is always better to have too much ram/swap then too little
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
5. because it is a good *nix habit! :-)
Jarry
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 12:04 ` jarry
@ 2006-02-23 13:55 ` Uwe Thiem
2006-02-23 14:05 ` John Jolet
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Uwe Thiem @ 2006-02-23 13:55 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 13:55 ` Uwe Thiem
@ 2006-02-23 14:05 ` John Jolet
2006-02-23 14:30 ` Dave Nebinger
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: John Jolet @ 2006-02-23 14:05 UTC (permalink / raw
To: gentoo-user
>
> 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.
The rule I always used (and do use) is twice ram, up to one gig of ram.
Pretty much after that, I just do a gig of swap, and monitor it for growth.
If my swap goes up AT ALL, I examine the typical workload on the box and
consider adding ram. Ram may be more expensive than disk, but at less than
$100 or so per gig, it's pretty cheap. I use swap as a "safety net",
allowing me enough time to react if something goes nuts or leaks.
>
> 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
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 13:55 ` Uwe Thiem
2006-02-23 14:05 ` John Jolet
@ 2006-02-23 14:30 ` Dave Nebinger
2006-02-23 16:03 ` Richard Fish
2006-02-23 14:45 ` Abhay Kedia
2006-02-23 14:53 ` [gentoo-user] <OT> " jarry
3 siblings, 1 reply; 12+ messages in thread
From: Dave Nebinger @ 2006-02-23 14:30 UTC (permalink / raw
To: gentoo-user
Uwe Thiem wrote:
>> 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.
This is never true. Swap is *always* called for, and for a good reason.
Your example of having a real-time responsive app requiring memory
residence is a determining factor of how much physical memory you'll
need to keep the app resident.
But the truth of the matter is this will not be your only app running on
the system. Throw some big memory hogs into play, i.e. an active X
session running locally and that remote X session you've started from
work, and pretty soon you can find yourself eating up that 1gb that you
thought would be fine.
Except that since you did not have any swap enabled, once you reach the
1gb limit, processes start failing. You find yourself unable to log
into the box because there's not enough memory to spawn a new shell.
You're forced to hard-boot the system and hope that the HD caches were
flushed to the disk before you hit the reset button.
Having swap is just another manner of safe-guarding your system. Once
you breach the physical limit, there's always swap to fall back on.
Sure all of your apps will suffer while swapping occurs, but at least
you stand a chance of cleaning up the situation w/o facing the hard
reboot option.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 14:30 ` Dave Nebinger
@ 2006-02-23 16:03 ` Richard Fish
2006-02-23 16:12 ` Dave Nebinger
0 siblings, 1 reply; 12+ messages in thread
From: Richard Fish @ 2006-02-23 16:03 UTC (permalink / raw
To: gentoo-user
On 2/23/06, Dave Nebinger <dnebinger@joat.com> wrote:
> This is never true. Swap is *always* called for, and for a good reason.
No, it isn't. For my single-user laptop with 2G of RAM, I actually
prefer that the OOM kill any runaway process that is gobbling up RAM.
My laptop disk (even at 7200rpm) is too damn slow for swap to be at
all useful. The system _will_ be dead until swap is exhausted and the
OOM kicks in anyway. The only reason I have a swap partition at all
is for suspend2 hibernation.
> Your example of having a real-time responsive app requiring memory
> residence is a determining factor of how much physical memory you'll
> need to keep the app resident.
>
> But the truth of the matter is this will not be your only app running on
> the system. Throw some big memory hogs into play, i.e. an active X
> session running locally and that remote X session you've started from
> work, and pretty soon you can find yourself eating up that 1gb that you
> thought would be fine.
No one would ever place a real-time responsive app on a desktop system.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
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
0 siblings, 2 replies; 12+ messages in thread
From: Dave Nebinger @ 2006-02-23 16:12 UTC (permalink / raw
To: gentoo-user
Richard Fish wrote:
> On 2/23/06, Dave Nebinger <dnebinger@joat.com> wrote:
>> This is never true. Swap is *always* called for, and for a good reason.
>
> No, it isn't. For my single-user laptop with 2G of RAM, I actually
> prefer that the OOM kill any runaway process that is gobbling up RAM.
> My laptop disk (even at 7200rpm) is too damn slow for swap to be at
> all useful. The system _will_ be dead until swap is exhausted and the
> OOM kicks in anyway. The only reason I have a swap partition at all
> is for suspend2 hibernation.
>
But again you have shown that swap is *always* called for. You've got
2gb ram, yet you still need swap for hibernation.
>> Your example of having a real-time responsive app requiring memory
>> residence is a determining factor of how much physical memory you'll
>> need to keep the app resident.
>>
>> But the truth of the matter is this will not be your only app running on
>> the system. Throw some big memory hogs into play, i.e. an active X
>> session running locally and that remote X session you've started from
>> work, and pretty soon you can find yourself eating up that 1gb that you
>> thought would be fine.
>
> No one would ever place a real-time responsive app on a desktop system.
So if your argument is that it would only go on a server, are you also
arguing that it would only go on a dedicated server? Or is it a
multi-function server that's also running perhaps a web server, an app
server, an email server, ftp server, etc.?
The addition of any sort of server which spawns threads in response to
incoming network connection means that you've got a variable memory
consumer which could, should incoming load require, a potential chance
to overwhelm physical memory.
Same situation, just a different scenario.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 16:12 ` Dave Nebinger
@ 2006-02-23 18:07 ` Alexander Skwar
2006-02-23 19:38 ` Uwe Thiem
1 sibling, 0 replies; 12+ messages in thread
From: Alexander Skwar @ 2006-02-23 18:07 UTC (permalink / raw
To: gentoo-user
Dave Nebinger wrote:
> You've got
> 2gb ram, yet you still need swap for hibernation.
No, he doesn't. suspend2 could also write the memory to a
file when hibernating.
That said, I'd find it rather useless to write to a plain
normal file, as you need to keep the space available anyway.
And with swap, you might at least make somewhat use of that
"wasted" space.
Alexander Skwar
--
I'd horsewhip you if I had a horse.
Ö\x01 -- Groucho Marx
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 16:12 ` Dave Nebinger
2006-02-23 18:07 ` Alexander Skwar
@ 2006-02-23 19:38 ` Uwe Thiem
1 sibling, 0 replies; 12+ messages in thread
From: Uwe Thiem @ 2006-02-23 19:38 UTC (permalink / raw
To: gentoo-user
On 23 February 2006 18:12, Dave Nebinger wrote:
> Richard Fish wrote:
> > On 2/23/06, Dave Nebinger <dnebinger@joat.com> wrote:
> >> This is never true. Swap is *always* called for, and for a good reason.
> >
> > No, it isn't. For my single-user laptop with 2G of RAM, I actually
> > prefer that the OOM kill any runaway process that is gobbling up RAM.
> > My laptop disk (even at 7200rpm) is too damn slow for swap to be at
> > all useful. The system _will_ be dead until swap is exhausted and the
> > OOM kicks in anyway. The only reason I have a swap partition at all
> > is for suspend2 hibernation.
>
> But again you have shown that swap is *always* called for. You've got
> 2gb ram, yet you still need swap for hibernation.
I don't use hibernation. ;-)
>
> >> Your example of having a real-time responsive app requiring memory
> >> residence is a determining factor of how much physical memory you'll
> >> need to keep the app resident.
> >>
> >> But the truth of the matter is this will not be your only app running on
> >> the system. Throw some big memory hogs into play, i.e. an active X
> >> session running locally and that remote X session you've started from
> >> work, and pretty soon you can find yourself eating up that 1gb that you
> >> thought would be fine.
> >
> > No one would ever place a real-time responsive app on a desktop system.
>
> So if your argument is that it would only go on a server, are you also
> arguing that it would only go on a dedicated server? Or is it a
> multi-function server that's also running perhaps a web server, an app
> server, an email server, ftp server, etc.?
You wouldn't run such an app on a server that offers services like FTP or
such.
I was actually involved in a project once that did that kind of stuff on a
desktop. It was a dedicated desktop, though. ;-)
Your main argument is that one needs swap as a safety net if one runs out of
ram. So you have, say 1 GB of ram and 1 GB of swap. What if you run out of
swap? Or: If that 1GB of swap on top of your 1GB of ram is enough for you to
never run out of swap, what's wrong with replaces it with another 1GB of ram
if you can afford it? Where is the bloody difference, except that you get a
faster box?
Uwe
--
Why do consumers keep buying products they will live to curse?
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] How many GB for / partition?
2006-02-23 13:55 ` Uwe Thiem
2006-02-23 14:05 ` John Jolet
2006-02-23 14:30 ` Dave Nebinger
@ 2006-02-23 14:45 ` Abhay Kedia
2006-02-23 14:53 ` [gentoo-user] <OT> " jarry
3 siblings, 0 replies; 12+ messages in thread
From: Abhay Kedia @ 2006-02-23 14:45 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
On Thursday 23 February 2006 19:25, Uwe Thiem wrote:
>
> End of rant.
>
I think you should read this article
http://rudd-o.com/archives/2006/01/11/why-swap-is-good-even-with-tons-of-ram/
I don't know about you but since I started using an archck kernel, I have
always seen my system actually using swap. The swap prefetch patch seems to
be working here and I don't mind at all. In fact it makes my system much more
responsive.
Here is the current free -m report.
$ free -m
total used free shared buffers cached
Mem: 495 485 9 0 61 131
-/+ buffers/cache: 293 202
Swap: 768 241 526
Now imagine that if I didn't have any swap space, that 241MB would have either
been eaten up from my RAM or those files would never have been cached. In
first scenario, it would reduce the capability of my system to cache the
important files in RAM b'cos it is already full with not-so-important files,
while in the latter case the Disk IO on my system will increase whenever I
needed those not-so-important files. What ever your choice might be, I
personally choose free RAM for better caching of files + lesser Disk IO, even
if that means spending 768MB of HDD space.
--
Regards,
Abhay
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] <OT> How many GB for / partition?
2006-02-23 13:55 ` Uwe Thiem
` (2 preceding siblings ...)
2006-02-23 14:45 ` Abhay Kedia
@ 2006-02-23 14:53 ` jarry
2006-02-23 15:22 ` Andrei Slavoiu
3 siblings, 1 reply; 12+ messages in thread
From: jarry @ 2006-02-23 14:53 UTC (permalink / raw
To: gentoo-user
Uwe Thiem <uwix@iway.na> wrote:
> There are too damn many myths about swap out there. Like this one:
> Always configure twice as much swap as you have ram. Why?
<OT>
Well, it depends on how swap is handled by system. In linux, your
total memory = physical memory + swap (as you wrote)
A couple years ago I got answer from HP, where they said with hp-ux:
total memory = physical memory + (swap - physical memory)
only if swap > physical memory !
and
total memory = physical memory
if swap < physical memory
(in other words, it was completely useless to have swap < phys.memory,
and optimum was really swap = 2 * physical memory)
They explained to me, that hp-ux 11 (or at least that early version)
allocates part of swap of the same size as physical memory and mirrors
the whole image of ram into swap for performance reasons: when more
memory is needed, it can be immediatelly made free, because it is
already paged to disk.
So when I had 1GB RAM and 2GB swap, even right after system boot-up
only 1GB of swap were free (in the other half of swap there was already
mirror of physical memory), and I could not start any process which
needed more than 2GB total memory.
It seemed to me to be a complete vaste, and I was really angry, because
it was time when 4 GB disk was a luxury (and e.g. irix did not have
this strange "feature"). But things might have changed since then...
</OT>
Jarry
--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] <OT> How many GB for / partition?
2006-02-23 14:53 ` [gentoo-user] <OT> " jarry
@ 2006-02-23 15:22 ` Andrei Slavoiu
0 siblings, 0 replies; 12+ messages in thread
From: Andrei Slavoiu @ 2006-02-23 15:22 UTC (permalink / raw
To: gentoo-user
--- jarry@gmx.net wrote:
> A couple years ago I got answer from HP, where they
> said with hp-ux:
> total memory = physical memory + (swap - physical
> memory)
This of course is equivalent to:
total memory = swap
I'm not sure, but I think Windows NT also uses this.
So practicaly the will be no memory allocation, but
"swap allocation". And the RAM is used just as cache
(for either files or swap).
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-02-23 19:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox