From d1497906e7299145f0207531a501e46afe058ecd Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 19 Aug 1998 00:36:10 +0000 Subject: [PATCH] added store_swap_mid variable. when store_swap_size is below _mid, we have slow replacement 1/s. When above _mid, we have fast replacement 10/s. --- src/store.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/store.cc b/src/store.cc index 66188ee37c..68178a8aba 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.443 1998/08/17 21:10:47 wessels Exp $ + * $Id: store.cc,v 1.444 1998/08/18 18:36:10 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -97,6 +97,7 @@ static int store_pages_high = 0; static int store_pages_low = 0; static int store_swap_high = 0; static int store_swap_low = 0; +static int store_swap_mid = 0; static int store_maintain_rate; static MemObject * @@ -594,6 +595,10 @@ storeMaintainSwapSpace(void *datanotused) if (store_rebuilding) { eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0, 1); return; + } else if (store_swap_size < store_swap_mid) { + max_scan = 100; + max_remove = 8; + eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0, 1); } else if (store_swap_size < store_swap_high) { max_scan = 200; max_remove = 8; @@ -811,6 +816,7 @@ storeConfigure(void) (float) Config.Swap.highWaterMark) / (float) 100); store_swap_low = (long) (((float) Config.Swap.maxSize * (float) Config.Swap.lowWaterMark) / (float) 100); + store_swap_mid = (store_swap_high >> 1) + (store_swap_low >> 1); store_pages_high = store_mem_high / SM_PAGE_SIZE; store_pages_low = store_mem_low / SM_PAGE_SIZE; -- 2.47.3