Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 1995 18:15:42 -0700
From:      David Greenman <davidg@Root.COM>
To:        Matt Dillon <dillon@best.com>
Cc:        bugs@freebsd.org
Subject:   Re: more on the paging thing 
Message-ID:  <199506250115.SAA00280@corbin.Root.COM>
In-Reply-To: Your message of "Sat, 24 Jun 95 16:25:27 PDT." <199506242325.QAA16868@shell1.best.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>    Hmm... well, here's the problem I see:
>
>    * shell machine, 130 users on line, sitting at around a load of 8
>    * vmstat shows free pages steadily declining
>    * system does a spurt of paging
>    * 30-50 processes suddenly go into the 'w' column, the 'r' column
>      jumps to 30 as well, for about 4 seconds
>    * things slowly smooth out again .. back to normal after 4 seconds
>
>    * repeat 30 seconds later...
>
>    The problem is that whenever this occurs, EVERYONE gets glitched...
>    everything comes to a screaming stop for a few seconds, then picks up
>    again.

   Not good...

>    Obviously, some heavily used pages are being paged out when they should
>    not be!

   It may seem that way, but things in this area can be quite misleading. I
think the problem has to do with swapping, not the regular paging algorithm.
If you're game, I think I'd like to try disabling swapping on your system and
see if the problem improves. A diff is attached for this purpose. There is
also a chance that this problem is another manifestation of pages being
cleaned even if memory isn't really very tight; I hesitate calling this
behavior a bug, but it might be good to look at it more carefully.

>    The question is how to solve the problem.  The system is not paging
>    heavily.  It's got 128MB of ram and nominally about 12M free, which
>    drops steadily over 30 seconds to 2M or less, then the system does a
>    spurt of paging for a few seconds which bumps the free back up to 12M,
>    and so on....  What I would like to do is lock the pages associated
>    with the c shared library and a few critical executable text areas 
>    (telnet, rlogind, and possibly tcsh) into memory.

   Keep in mind that "real" free memory isn't really the complete picture. In
post-FreeBSD 2.0, there is another category of free memory that is /almost/
free. We call this "VM cache pages". These pages are clean and not mapped in
any process. They can be freed at anytime except during interrupts. They
generally contain cached file data, but may contain parts of executables.
"vmstat <interval>" hasn't yet been updated to include cache pages, but this
information is available with "vmstat -s".

-DG

Index: vm_pageout.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/vm_pageout.c,v
retrieving revision 1.51
diff -c -r1.51 vm_pageout.c
*** 1.51	1995/05/30 08:16:18
--- vm_pageout.c	1995/06/25 01:13:41
***************
*** 747,752 ****
--- 747,753 ----
  				wakeup((caddr_t) &vfs_update_wakeup);
  			}
  		}
+ #if 0
  		/*
  		 * now swap processes out if we are in low memory conditions
  		 */
***************
*** 755,760 ****
--- 756,762 ----
  			vm_pageout_req_swapout = 1;
  			vm_req_vmdaemon();
  		}
+ #endif
  	}
  
  	if ((cnt.v_inactive_count + cnt.v_free_count + cnt.v_cache_count) <



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506250115.SAA00280>