diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 2003-01-25 19:32:35 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 2003-01-25 19:32:35 +0000 |
commit | e027a83457fee691e5468472cba8530de02b2d34 (patch) | |
tree | 9db419a2ac63a9ad5f6b1a3c2a097f112e1b255b /usr.sbin/sade | |
parent | c3342fe1412c1ce851b9b8f8f75e6cd6f9660d89 (diff) | |
download | src-e027a83457fee691e5468472cba8530de02b2d34.tar.gz src-e027a83457fee691e5468472cba8530de02b2d34.zip |
Change the nominal swap calculation from 1/2 physical memory to 1/8
physical memory. The default is still 2x physical memory. The nominal
calculation is used to back-off swap auto-allocation ('A'uto command)
when the disk is not large enough to accomodate all filesystem auto-defaults.
This gives other partitions (like /usr) more priority over swap on smaller
disks.
This should help solve reported auto-sizing failures on machines with small
hard drives and huge amounts of memory. For example, a machine with 2G of
disk and 4G of memory will fail to auto-size without this fix.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=109827
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r-- | usr.sbin/sade/label.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 305eaada8346..24d438f5244d 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -1350,7 +1350,7 @@ try_auto_label(Device **devs, Device *dev, int perc, int *req) def = SWAP_MIN_SIZE * ONE_MEG; if (def > SWAP_AUTO_LIMIT_SIZE * ONE_MEG) def = SWAP_AUTO_LIMIT_SIZE * ONE_MEG; - nom = (int)(physmem / 512) / 2; + nom = (int)(physmem / 512) / 8; sz = nom + (def - nom) * perc / 100; } swap_chunk = Create_Chunk_DWIM(label_chunk_info[here].c->disk, |