NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Linux compat and swap
On Thu, 23 Apr 2020 14:24:53 -0700
"Greg A. Woods" <woods%planix.com@localhost> wrote:
> At Thu, 23 Apr 2020 11:56:08 +0100, Sad Clouds
> <cryintothebluesky%gmail.com@localhost> wrote: Subject: Re: Linux compat and
> swap
> >
> > On Thu, 23 Apr 2020 10:56:15 +0100
> > Mike Pumford <mpumford%mudcovered.org.uk@localhost> wrote:
> >
> > > If you have both memory intensive and filesystem intensive
> > > processes running on a NetBSD system the kernel filesystem cache
> > > can end up evicting programs running in the background that are
> > > inactive which then take a LONG time to recover. For a system
> > > with a reasonable amount of memory I found the vm.filemin and
> > > vm.filemax needed to be tweaked so that filesystem cache was more
> > > likely to be tweaked than program code.
> >
> > Is this correct? I always thought that file cache was opportunistic,
> > i.e. it will use all free memory, but under no circumstances it
> > should evict any pages of running programs. The opposite should
> > happen, i.e. any program using memory should be allowed to steal it
> > from file cache at any time.
> >
>
> Mike's description is correct.
>
> Processes can only take over memory from the file cache if the value
> for vm.filemin is small enough. That is, after all, what vm.filemin
> means.
OK I stand corrected, I changed vm.filemax from 5 to 90 and then did
"dd if=/dev/zero of=out bs=1m count=5000" on a VM with 4GiB of RAM and
a process which malloc()ed 3GiB. This time it started swapping pages
to disk.
vm.anonmin=60
vm.anonmax=90
vm.filemin=1
#vm.filemax=5
vm.filemax=90
vm.execmin=5
vm.execmax=60
Home |
Main Index |
Thread Index |
Old Index