diff options
author | dyson <dyson@FreeBSD.org> | 1998-02-24 10:16:23 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1998-02-24 10:16:23 +0000 |
commit | 4730cf91f67350adf842154d5e5d2a54ad2480c4 (patch) | |
tree | ea086caa163ec9ae0ced6a02ea6afc84ae4e17d6 /sys/vm/vm_pageout.c | |
parent | 4062b72b6cf4483ad54054a06e076cdd4e65da5e (diff) | |
download | FreeBSD-src-4730cf91f67350adf842154d5e5d2a54ad2480c4.zip FreeBSD-src-4730cf91f67350adf842154d5e5d2a54ad2480c4.tar.gz |
Correct some severe VM tuning problems for small systems (<=16MB), and
improve tuning on larger systems. (A couple of the VM tuning params for
small systems were so badly chosen that the system could hang under load.)
The broken tuning was originaly my fault.
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r-- | sys/vm/vm_pageout.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index b7a8a87..6eb7927 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.114 1998/02/09 06:11:34 eivind Exp $ + * $Id: vm_pageout.c,v 1.115 1998/02/23 08:22:37 dyson Exp $ */ /* @@ -1163,7 +1163,7 @@ vm_size_t count; cnt.v_pageout_free_min = (2*MAXBSIZE)/PAGE_SIZE + cnt.v_interrupt_free_min; cnt.v_free_reserved = vm_pageout_page_count + - cnt.v_pageout_free_min + (count / 2048) + PQ_L2_SIZE; + cnt.v_pageout_free_min + (count / 768) + PQ_L2_SIZE; cnt.v_free_min += cnt.v_free_reserved; return 1; } @@ -1188,12 +1188,15 @@ vm_pageout() * free_reserved needs to include enough for the largest swap pager * structures plus enough for any pv_entry structs when paging. */ - cnt.v_free_target = 3 * cnt.v_free_min + cnt.v_free_reserved; + if (cnt.v_free_count > 6144) + cnt.v_free_target = 3 * cnt.v_free_min + cnt.v_free_reserved; + else + cnt.v_free_target = 2 * cnt.v_free_min + cnt.v_free_reserved; - if (cnt.v_free_count > 1024) { - cnt.v_cache_max = (cnt.v_free_count - 1024) / 2; - cnt.v_cache_min = cnt.v_free_target * 2; - cnt.v_inactive_target = 2*cnt.v_cache_min + 192; + if (cnt.v_free_count > 2048) { + cnt.v_cache_min = cnt.v_free_target; + cnt.v_cache_max = 2 * cnt.v_cache_min; + cnt.v_inactive_target = (3 * cnt.v_free_target) / 2; } else { cnt.v_cache_min = 0; cnt.v_cache_max = 0; |