256 MB swap partition size and 1GB physical RAM
Woodchuck
marmot at pennswoods.net
Sat May 3 16:52:06 PDT 2008
On Sat, 3 May 2008, Morton D. Trace wrote:
> For the 4.2 version of open BSD, how large should the swap partition
> ideally be?
>
> is the size the same for i386 and amd64 ?
> it depends only on physical RAM, please?
It depends on your needs... You don't need swap, and won't
use swap, until your machine is running enough processes that
it runs out of physical ram. This can be due to a single
pig of a process (notoriously, mozilla/firefox), or to many
smaller processes. Some servers need lots and lots of memory
(swap is part of that), some need no swap at all.
> if I have an old PC for experimenting with say 256 MB RAM.
> and the latest OpenBSD, how large should ideally the swap be?
I use a gigabyte of swap in conditions similar to this. But see
preceding paragraph. You don't need swap unless you do. ;-)
> I do face the problem that even invoking mc
> the midnight commander takes 60 seconds.
I doubt that this is due to swap space issues.
To watch use of swap, use "top" or "systat swap".
Use swapctl to add additional swap space if it is needed. You
know it is needed when systat shows swap as full.
> Some applications runs well and I can experience no difference to
> other OS.
>
>
> I think it can be some amd64 problems and it could be that
> all 32 bit runs faster,
>
>
> http://bulk.fefe.de/scalability/#newdata
>
> What do you think?
> is the OpenBSD Experience suffering of improper swap size partition?
>
>
> # disklabel wd0
> # Inside MBR partition 1: type A6 start 143380125 size 20498940
> # /dev/rwd0c:
...
> bytes/sector: 512
...
> 16 partitions:
> # size offset fstype [fsize bsize cpg]
> a: 530145 143380125 4.2BSD 2048 16384 1
> b: 273105 143910270 swap
That's 273105 *sectors*, one sector is 512 bytes. So this looks like
only 128MB of swap. You can increase this (if needed) by swapping
to a dedicated file on some other partition. (See man swapctl).
Dave
More information about the Openbsd-newbies
mailing list