Subject: Re: Back to square one - newbie question?
To: John Niven <senseamp@comcast.net>
From: TLorD <tld@tld.digitalcurse.com>
List: netbsd-help
Date: 07/01/2005 21:01:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Niven wrote:
> So a question that came up last time was how big should I make my
> partitions, and which ones?
Ah, the life-long question :D
> I have (free thanks to workplace re-cycling :-) 1Gb of ram. I understood
> the swap partition should be the same as the ram, but the default was
> 128Mb last time. Should I change that?
There are different schools for swap. I belong to the one that says "swap+ram
should be 10% more than the most you'll ever use". In other words, think about
your expected workload. If it goes at most around 700MB, do not place any swap
at all. Should the need arise for (more) swap, you can still use swapfiles (a
tiny little bit slower but far more adaptable than repartitioning) on the fly.
I've configured few machines to work only with swapfiles, it's really just a
matter of few seconds (dd, swapctl and you're done).
> To recap, I have a dual 200MHz Pentium Pro Tyan m/b, with 1Gb of ram,
> and three 9Gb SCSI disks hanging off a Buslogic PCI card. So far I have
> only used one of the disks on my previous installation (just learning).
> Any recommendations of how best to use my three disks?
I guess the SCSI controller can do hardware raid?
If that's the case, you might want to consider joining them as one 18GiB disk
(RAID5) or as a 27GiB larger disk (striping). It's definitely instructive and
has quite some pros.
Of course, even if the controller doesn't have hardware raid, you still can go
raidctl(8). If you do, remember that NetBSD needs to boot off a plain (or
mirrored) partition.
Remember that swap on a raid partition usually decreases performances, tho.
As for partitioning itself, again there are different schools.
One is the roughly-one-partition-per-directory-in-root, which goes one for
/usr, one for /var, one for /tmp, one for /home and maybe more. The good thing
is that, if done right, you might gain some security (at the expense of
maintaince time), faster recovery time and some more; the downside is that it
takes more effort to get it right ("damn, I need 20M more on /usr!").
Another is the one-partition-fits-all, which is easier to build but has lower
security and can incur in more serious data loss. When in doubt and have a
single (possibly raid) disk, choose this.
Then there is a hybrid solution which is to have one partition for /, one for
/home and possibly other partitions for /tmp, /usr and /var. This is most
useful if you have multiple disks and don't want to raid or ccd them together.
/tmp is sometimes mounted as a ram disk, which is fast but will probably raise
the need for swap.
Whatever you choose, the most traffic usually goes on in swap, /tmp and /home
and, in some configurations, /var. /usr will often have read traffic. If
performance if the key, try to put them on separate disks.
Personally, I usually go for the one-partition-per-disk way, symlink-ing or
mount_null-ing directories around when I need more space off one disk. This
way I can fine-tune free space but with drawbacks, expecially with network
exports (which usually can't jump over a symlink or a mount).
Experimenting around will get you some experience, and it's often just a
matter of personal taste.
Hope this helps! :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCxZMLMiWEUf7YMGERAt/2AJ9m/JtUa6ilSxYDg6xBwwnfzbWxBgCgq7kG
mvqt70K3kNorFSGH5F4bZxY=
=7ac5
-----END PGP SIGNATURE-----