Partition sizing

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Partition sizing

M...
Hello.

I'm playing with OpenBSD 3.8 and would like some
comments/advice on partitioning.
I have a 500MHz test machine, 256MB RAM, 4GB H/D,
100/1Gb intel ethernet card.

Most of the examples show separate partitions for

/
/tmp
/var
/usr
/home

I want to run a mailsever (20 users),
(spamassasin/clamav) mailing list server (20 lists),
ftp and web servers, (maybe 100MB or so of data)
adding them in and seeing how it handles the load.

I was thinking of doing

/ = 500MB
/tmp - 100MB
/usr - 1GB
/var - 1GB
/home - 1.4GB

or should I just have a root and home partitions ?

I'm not really sure about the sizing for /tmp or /var
so I want to be economical with the limited space.

Opinions please.

Thanks in advance.
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Nick Holland-2
On Fri, Jan 20, 2006 at 10:29:51AM -0800, M... wrote:

> Hello.
>
> I'm playing with OpenBSD 3.8 and would like some
> comments/advice on partitioning.
> I have a 500MHz test machine, 256MB RAM, 4GB H/D,
> 100/1Gb intel ethernet card.
>
> Most of the examples show separate partitions for
>
> /
> /tmp
> /var
> /usr
> /home
>
> I want to run a mailsever (20 users),

20 users of text mail?
20 users of PDF scanned legal documents?

> (spamassasin/clamav) mailing list server (20 lists),
> ftp and web servers, (maybe 100MB or so of data)
> adding them in and seeing how it handles the load.
>
> I was thinking of doing
>
> / = 500MB

too big.  150MB will do it VERY nicely.  200MB if you think I'm
being too tight.  70M will do fine, too. :)

> /tmp - 100MB

Paranoia makes me make that bigger, usually 200M, though I can't think
of a reason why on your app.

> /usr - 1GB

keep in mind, that's too small for building, but great for binaries.

> /var - 1GB

sounds big...

> /home - 1.4GB

sounds VERY big...
What are you putting in /home?

> or should I just have a root and home partitions ?

Not if you are planning on doing something other than testing.

> I'm not really sure about the sizing for /tmp or /var
> so I want to be economical with the limited space.
>
> Opinions please.

Suggestion 1: Quit assuming your first install will be your last.
Install, look around, see how it works, adjust, try again, adjust,
try again. repeat until (done);

Figure out your OWN needs, don't ask others.  We don't know, and
more importantly, it's your job/reputation on the line.

Suggestion 2: Quit trying to allocate all your disk space.  Leave some
empty space at the end that you can move into if you need to.  Make var
and home 500M ea., leave a gig or so free, put /var at the end of
allocated space, if you find out you made /var too small (most likely),
growfs it.  If you find /home is too small, move into the 1G space.

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

David Higgs
In reply to this post by M...
See FAQ 4.6.
http://www.openbsd.org/faq/faq4.html#SpaceNeeded

You forgot the swap partition.  Also, your / is probably way overkill.
 I haven't run a production mail/list/ftp server, so I can't speak for
the remaining estimates.

--david

On 1/20/06, M... <[hidden email]> wrote:

> Hello.
>
> I'm playing with OpenBSD 3.8 and would like some
> comments/advice on partitioning.
> I have a 500MHz test machine, 256MB RAM, 4GB H/D,
> 100/1Gb intel ethernet card.
>
> Most of the examples show separate partitions for
>
> /
> /tmp
> /var
> /usr
> /home
>
> I want to run a mailsever (20 users),
> (spamassasin/clamav) mailing list server (20 lists),
> ftp and web servers, (maybe 100MB or so of data)
> adding them in and seeing how it handles the load.
>
> I was thinking of doing
>
> / = 500MB
> /tmp - 100MB
> /usr - 1GB
> /var - 1GB
> /home - 1.4GB
>
> or should I just have a root and home partitions ?
>
> I'm not really sure about the sizing for /tmp or /var
> so I want to be economical with the limited space.
>
> Opinions please.
>
> Thanks in advance.
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

M...
In reply to this post by Nick Holland-2
--- Nick Holland <[hidden email]>
wrote:


> Suggestion 2: Quit trying to allocate all your disk
> space.  Leave some
> empty space at the end that you can move into if you
> need to.  Make var
> and home 500M ea., leave a gig or so free, put /var
> at the end of
> allocated space, if you find out you made /var too
> small (most likely),
> growfs it.  If you find /home is too small, move
> into the 1G space.
>
> Nick.

Thanks to Nick and others, I have an update.  I left
out SWAP as well.

/ - 200MB
/swap - 200MB ?
/tmp - 200MB
/usr - 1.5GB
/home - 500MB
/var - 500MB

Rest spare for later.  Oh, I'm going to use qmail and
ezmlm for the mail and list server so email will be
delivered into their home directory using  Maildir.

I know swap used to be 2x the memory, but does that
still hold with 256MB RAM installed ? as opposed to
years ago with 32MB or 64MB ?

Thanks for the hints/suggestions
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Matthias Kilian
In reply to this post by Nick Holland-2
On Fri, Jan 20, 2006 at 03:13:21PM -0500, Nick Holland wrote:
> > / = 500MB
>
> too big.  150MB will do it VERY nicely.  200MB if you think I'm
> being too tight.  70M will do fine, too. :)

Or even 50M (3.8 on i386), but this would be a little bit on the
edge.

> > /tmp - 100MB
>
> Paranoia makes me make that bigger, usually 200M, though I can't think
> of a reason why on your app.

I've made no bad experiences in using an mfs for /tmp with a size
between 32MB (small router) and 256MB (desktop) or something between
(webserver with some additional shell accounts).

> > /var - 1GB
>
> sounds big...

What about /var/spool/mail or, for example, /var/spool/uucp? Yes,
I may be oldfashioned, but IMHO the first filesystem that fills up
is always /var.

Ciao,
        Kili

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Eric Johnson-5
On Fri, 20 Jan 2006 22:08:47 +0100
Matthias Kilian <[hidden email]> wrote:

> What about /var/spool/mail or, for example, /var/spool/uucp? Yes,
> I may be oldfashioned, but IMHO the first filesystem that fills up
> is always /var.

For my mail server, I created a /var/mail partition of 10 GB.  It is
currently about 40% full.

We don't restrict mailbox size for our users, but if a mailbox is
getting too full, we back it up, remove it, and notify the user how he
can get a backup copy.  So far, noone has ever asked for a backup copy.

Eric Johnson

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Han Boetes
In reply to this post by M...
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a      118M   56.8M   55.5M    51%    /
/dev/wd0d     98.3M    8.0K   93.4M     0%    /tmp
/dev/wd0e      490M   91.4M    374M    20%    /var
/dev/wd0f     49.4M    1.5M   45.4M     3%    /var/qmail
/dev/wd0g      3.8G    1.5G    2.2G    40%    /usr
/dev/wd0h     70.5G   64.3G    2.7G    96%    /home



# Han

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Nick Holland
In reply to this post by M...
M... wrote:
...
> I know swap used to be 2x the memory, but does that
> still hold with 256MB RAM installed ? as opposed to
> years ago with 32MB or 64MB ?

That advice is as bogus now as it was then.

The answer is, "use what YOU need".
Most of the time, if your system starts swapping, you are hurting.

The "Swap = 2x Physical" rule makes a little sense if you have a LOT of
applications loaded, but only a few are actually active at any one time,
AND waiting for a swapped-out app to get reloaded into RAM and an
inactive app to be swapped out is acceptable.  That's an unusual
situation for many, probably even most, systems.

The other application I have found for swap is where one app will
suddenly start demanding astronomical amounts of RAM for a brief moment,
and the nature of the task is where it doesn't matter if it takes two
minutes or twenty minutes.

Usually, however, if you are running any kind of server and you expect
swap, you need more RAM, not to be quibbling about swap sizes.

Core dumps are saved to swap, but then, they get unloaded to /var on
boot, so IF you care about this (and most people probably should not),
you have to size several things appropriately...swap slightly bigger
than physical RAM, and enough free space on /var to have at least one
core dump, probably multiple.

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

J Moore
In reply to this post by M...
On Fri, Jan 20, 2006 at 10:29:51AM -0800, the unit calling itself M... wrote:
> Hello.
>
> I'm playing with OpenBSD 3.8 and would like some
> comments/advice on partitioning.
> I have a 500MHz test machine, 256MB RAM, 4GB H/D,
> 100/1Gb intel ethernet card.

<< snip >>

> Opinions please.

Get a bigger H/D... 40 GB is about the smallest you can buy today; 4 GB
drives have not been made in years.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Lars Hansson
On Sat, 21 Jan 2006 03:30:34 -0600
J Moore <[hidden email]> wrote:
> Get a bigger H/D... 40 GB is about the smallest you can buy today; 4 GB
> drives have not been made in years.

Why? 4Gb is more than enough for trying out OpenBSD.

---
Lars Hansson

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

J Moore
On Sat, Jan 21, 2006 at 05:42:08PM +0800, the unit calling itself Lars Hansson wrote:
> On Sat, 21 Jan 2006 03:30:34 -0600

> > Get a bigger H/D... 40 GB is about the smallest you can buy today; 4 GB
> > drives have not been made in years.
>
> Why? 4Gb is more than enough for trying out OpenBSD.

Why? What's the point of learning how to do anything on marginal,
nearly-antique hardware? What is lost by using a reasonably sized,
current piece of hardware? He asked for advice & I think that's the
best course of action.

What a stupid question, Lars!

Jay

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Tony Aberenthy
On Saturday, January 21, 2006 2:16 PM the <whatever> calling itself
J Moore wrote:

> On Sat, Jan 21, 2006 at 05:42:08PM +0800, the unit calling itself
> Lars Hansson wrote:
> > On Sat, 21 Jan 2006 03:30:34 -0600
>
> > > Get a bigger H/D... 40 GB is about the smallest you can buy
> today; 4 GB
> > > drives have not been made in years.
> >
> > Why? 4Gb is more than enough for trying out OpenBSD.
>
> Why? What's the point of learning how to do anything on marginal,
> nearly-antique hardware? What is lost by using a reasonably sized,
> current piece of hardware? He asked for advice & I think that's the
> best course of action.
>
> What a stupid question, Lars!
>
> Jay

Lots of fsck time and an unbootable system if I understand this stuff.
Disk space outside the filesystems does not need to be checked.
Disk space you do not have does not need to be checked.
In fact if coming up fast from a power fail is the objective,
4G seems like way too much.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

K Kadow
On 1/21/06, [hidden email] <[hidden email]> wrote:
> Lots of fsck time and an unbootable system if I understand this stuff.

Actually, since fsck is all about metadata (inodes), a big, mostly-empty
isn't going to take much longer to check than a smaller partition with
the same number of used inodes and cylinder groups.


> Disk space outside the filesystems does not need to be checked.

This is true.  If you have a much bigger drive than you really need,
consider leaving unallocated space outside the filesystems,
as suggested earlier by Nick.


> Disk space you do not have does not need to be checked.
> In fact if coming up fast from a power fail is the objective,
> 4G seems like way too much.

You can always buy a 40GB drive and only use the first 3GB if you like,
with the advantage of short seek time and faster disk access :)

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Joachim Schipper
In reply to this post by J Moore
On Sat, Jan 21, 2006 at 02:15:37PM -0600, J Moore wrote:

> On Sat, Jan 21, 2006 at 05:42:08PM +0800, the unit calling itself Lars Hansson wrote:
> > On Sat, 21 Jan 2006 03:30:34 -0600
>
> > > Get a bigger H/D... 40 GB is about the smallest you can buy today; 4 GB
> > > drives have not been made in years.
> >
> > Why? 4Gb is more than enough for trying out OpenBSD.
>
> Why? What's the point of learning how to do anything on marginal,
> nearly-antique hardware? What is lost by using a reasonably sized,
> current piece of hardware? He asked for advice & I think that's the
> best course of action.

Marginal, nearly-antique hardware tends to constrain one from doing
things too inefficiently, which is a good thing.

However, 4 GB is usually sufficient. Unless you are compiling KDE from
source, storing your entire music collection, storing a couple of
videos, or storing years' worth of very inefficient documents [1], or
doing something similar, 4 GB is likely to be sufficient.

That said, most of my machines have more disk, and it certainly makes
life easier. That does not mean it is necessary, though.

                Joachim

[1] One of my servers stores such for eight to ten years, with an
average of, say, four to five people working on it; the whole thing
comes out to 12 GB, with a lot of duplicate files and no coordinated
effort to clean out the old cruft; all this in Word documents - when
using plain text files, or something like LaTeX, it is almost
impossible.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Ted Unangst-2
In reply to this post by K Kadow
On 1/21/06, Kevin <[hidden email]> wrote:
> On 1/21/06, [hidden email] <[hidden email]> wrote:
> > Lots of fsck time and an unbootable system if I understand this stuff.
>
> Actually, since fsck is all about metadata (inodes), a big, mostly-empty
> isn't going to take much longer to check than a smaller partition with
> the same number of used inodes and cylinder groups.

untrue.

Reply | Threaded
Open this post in threaded view
|

Re: Partition sizing

Craig Skinner
In reply to this post by Han Boetes
3 * PII 350s on a small office LAN, all 3.8 release & binary only:

LAN server, home dirs, backups, mail, 2 * 3Gig drives, 128Mb ram:

Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a     49.3M   23.3M   23.6M    50%    /
/dev/wd0h      295M    6.0K    280M     0%    /tmp
/dev/wd0g     98.3M    9.5M   83.9M    10%    /var
/dev/wd0e      942K   46.0K    850K     5%    /var/named
/dev/wd0f     49.4M    104K   46.8M     0%    /var/spool/postfix
/dev/wd0d      245M    153M   80.1M    66%    /usr
/dev/wd0i      2.1G   15.5M    2.0G     1%    /home
/dev/wd1d      2.7G    102M    2.4G     4%    /var/snapshots


LAN log box, 1 * 3Gig drive, 64Mb ram:

Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a     49.3M   22.5M   24.3M    48%    /
/dev/wd0e     98.3M   34.0K   93.4M     0%    /tmp
/dev/wd0d      195M    123M   61.8M    67%    /usr
/dev/wd0f     98.3M    5.3M   88.1M     6%    /var
/dev/wd0g      2.4G    2.6M    2.3G     0%    /var/log


Public host, database, web server & cache, DNS master, MX backup
1 * 3Gig & 1 * 4Gig drives, 196Mb ram:

/dev/wd0a     49.3M   27.9M   19.0M    59%    /
/dev/wd0j      245M    4.0K    233M     0%    /tmp
/dev/wd0e      195M    3.1M    182M     2%    /var
/dev/wd0f      9.6M    106K    9.1M     1%    /var/named
/dev/wd0h      490M   25.4M    440M     5%    /var/postgresql
/dev/wd0g      490M   16.9M    448M     4%    /var/www
/dev/wd1d      3.7G   76.0K    3.5G     0%    /var/spool/postfix
/dev/wd0i      9.6M   20.0K    9.1M     0%    /home
/dev/wd0k      490M    130M    336M    28%    /var/squid
/dev/wd0l      493M    2.0K    468M     0%    /var/spool/news
/dev/wd0d      295M    169M    111M    60%    /usr


Plenty of room to play with, swap is never used, processer loads never
get above 0.8. 5 used boxes delivered to the door for less than a quater
of the cost of 1 new Dell desktop. OpenBSD rocks on old kit.

Disk reliability? rsnapshot the lot to 1 disk & backup the contents offsite
nightly. If the office burns down, I'll not morn the hardware & can
recover without drama.