>We've kind of side tracked, but Yes, I do understand the limitations of 
>running without swap. However, in the interest of performance, I, and in 
>fact my whole organization which runs about 300 servers, disable swap.  
>We've never had an out of memory problem in the past because of kernel 
>memory. Is that wrong? We can't typically afford to have the kernel swap 
>out portions of the application to disk and back.

Why do you think your performance *improves* if you don't use
swap?  It is much more likely it *deteriates* because your swap
accumulates stuff you do not use.

>At any rate, I don't think adding swap will fix the problem I am seeing 
>in that ZFS is not releasing its unused cache when applications need it. 
>Adding swap might allow the kernel to move it out of memory but when the 
>system needs it again it will have to swap it back in, and only 
>performance suffers, no?

Well, you have decided that all application data needs to be memory
resident all of the time; but executables don't need to be (they
are now tossed out on memory shortage) and that ZFS can use less cache
than it wants to.

>FWIW, here's the current ::memstat and swap output for my system. The 
>reserved number is only about 46M or about 2% of RAM. Considering the 
>box has 3G, I'm willing to sacrifice 2% in the interest of performance.
>
>Page Summary                Pages                MB  %Tot
>------------     ----------------  ----------------  ----
>Kernel                     249927              1952   64%
>Anon                        34719               271    9%
>Exec and libs                2415                18    1%
>Page cache                   1676                13    0%
>Free (cachelist)            11796                92    3%
>Free (freelist)             88288               689   23%
>
>Total                      388821              3037
>Physical                   382802              2990
>
>[EMAIL PROTECTED]: swap -s
>total: 260008k bytes allocated + 47256k reserved = 307264k used, 381072k 
>available

So there's 47MB of memory which is not used at all.  (Adding swap will
give you 47MB of additional free memory without anything being written
to disk).  Execs are also pushed out on shortfall.

There is 265 MB of anon memory and we have no clue how much of it
is used at all; a large percentage is likely unused.

But OTOH, you have sufficient memory on the freelist so there is not
much of an issue.

Casper
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to