Re: headsup: swap_pager.c
From: Andy Farkas (andyf_at_speednet.com.au)
Date: 08/02/03
- Previous message: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Maybe in reply to: Robert Watson: "Re: headsup: swap_pager.c"
- Next in thread: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Reply: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Reply: Andy Farkas: "Re: headsup: swap_pager.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 2 Aug 2003 10:28:10 +1000 (EST) To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Poul-Henning Kamp wrote:
> People who do not adjust NSWAPDEV to match their configuration spend
> a lot of RAM on holding the radix bitmap which is 3/4 empty:
>
> critter phk> sysctl kern.malloc | grep -i swap
> SWAP 2 753K 753K 2 64
> critter phk> pstat -s
> Device 1K-blocks Used Avail Capacity
> /dev/ad0s1b 1321312 0 1321312 0%
>
> This is because the radix bitmap gets allocated for the full
> stripe width, but only one quarter of it is actually used.
>
> Another thing is that striping does not belong in the swap_pager in
> the first place, we have CCD and similar pieces of code for that.
I wasn't going to say anything (you can delete now) but the more I think
about it, the more I think "if it aint broke, dont fix it".
For a start, what do those kern.malloc numbers mean? Mine are different:
# sysctl kern.malloc | grep -i swap
SWAP 2 73K 137K 12 64,65536
# pstat -s
Device 1K-blocks Used Avail Capacity Type
/dev/ad0s1b 65536 144 65392 0% Interleaved
/dev/md0 65104 0 65104 0% Interleaved
/dev/md1 65104 0 65104 0% Interleaved
/dev/md2 130208 0 130208 0% Interleaved
Total 325952 144 325808 0%
I don't understand what the concern about using "a lot of RAM" is when you
yourself say that RAM is cheap. If its affecting KVA or something, then
maybe NSWAPDEV should be added into GENERIC along with an explanation that
tuning it saves memory. If the user^Wadmin is aware of the "problem" then
she can adjust the value when she customises her kernel.
Maybe it should be mentioned somewhere (sysinstall or swapctl.8) that the
*size* of swap also affect the memory footprint of the kernel. The general
rule is to have swap 2x RAM - do people really make huge swapfiles that
never get used? My box has 512M RAM, my swapfile size is 64M and hardly
used. I don't do crashdumps. Sure, developers will want crashdumps...but
thats different.
So I guess Im saying you could "fix" this issue but just documenting what
effects swapfile metrics have on your RAM.
--
:{ andyf@speednet.com.au
Andy Farkas
System Administrator
Speednet Communications
http://www.speednet.com.au/
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Maybe in reply to: Robert Watson: "Re: headsup: swap_pager.c"
- Next in thread: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Reply: Poul-Henning Kamp: "Re: headsup: swap_pager.c"
- Reply: Andy Farkas: "Re: headsup: swap_pager.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- oom-killer: gfp_mask=0xd1 with 2.6.12 on EM64T
... On a dual EM64T Xeon with 4GB of RAM, ... all swap space still available).
... oom-killer kills one or two of those processes, with the kernel messages ...
(Linux-Kernel) - Re: Simple script that locks up my box with recent kernels
... >> and just run the resulting kernel version for a day or two. ... then
I'll restart bisection and give each ... The box has 2GB of RAM and 768MB swap.
... (Linux-Kernel) - Re: running Linux with no swap space (but lots of RAM)
... | expense of RAM. ... what would have to be running to make use of 256 GB of
swap? ... As long as there is still unallocated memory, ... At this point,
the kernel is ... (comp.os.linux.development.system) - Re: Fedora Core 2 - Processes Eating 20X more memory
... will see this happen because FC2 uses the 2.6 kernel, ... Overall it is designed
to use more ram and less swap. ... upgraded from FC1 to FC2. ... (alt.os.linux.redhat) - Re: What size for the swap with a kernel 2.4x and 8GB RAM
... only around 890 MB if the kernel was compiled without HIGHMEM support. ... the
maximum size for the swap partitionis around ... the RAM" as a rule on 32-bit x86's
with more than 2 GB of RAM. ... I recommend upgrading to 2.4.32 - which is the current
stable 2.4 ... (comp.os.linux.misc)