NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/55166: uvm_pdpolicy_clock params (anon/exec/file max/min)defaults



On Mon, Apr 13, 2020 at 03:30:04PM +0000, Izumi Tsutsui wrote:
> The following reply was made to PR kern/55166; it has been noted by GNATS.
> 
> From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: joerg%bec.de@localhost, tsutsui%ceres.dti.ne.jp@localhost
> Subject: Re: kern/55166: uvm_pdpolicy_clock params (anon/exec/file max/min)defaults
> Date: Tue, 14 Apr 2020 00:29:16 +0900
> 
>  joerg@ wrote:
>  
>  >  > There parameters can be changed by sysctl(8), but initial values
>  >  > are hardcorded in uvmpdpol_init():
>  >  
>  >  What about actually tuning the initial parameters on the amount of RAM
>  >  in the system? That seems much more sensible than hard-coding different
>  >  option sets in various kernels. It's not like it is going to add a lot
>  >  of (cold) code.
>  
>  I'm afraid we don't have reasonable fomula to determine optimized
>  parameters per the amount of RAM.  IIRC, there were several discussion
>  about the default value ("current filemax was too large" etc.) just
>  after UBC was introduced, but I didn't see any conclusion.
>  
>  My suggestion (making the initial parameters configurable) is just
>  an intermediate fix.

Sure, we are quite bad at auto-tuning based on avalable memory in 
general. That doesn't mean we shouldn't try. We don't have to go for 
perfect here either. Pick a reasonable size for boosting exec 
specifically should be enough.

>  >  filemax seems questionable to me, the rest sound a useful default for
>  >  systems with <= 16MB RAM. 
>  
>  I guess the default BUFCACHE (vm.bufcache / vm.bufmem, 15% of RAM) is
>  enough and no extra file cache is necessary for less memory systems.

But the buffer cache is only used for meta-data, not for regular
caching?

Joerg


Home | Main Index | Thread Index | Old Index