Monday, June 25, 2018

Re: vimvars: maxmem+maxmemtot dflt: xxkB or .5*totmem, whichever is what?: larger|smaller?

On Mon, Jun 25, 2018 at 11:15 PM, L A Walsh <vim@tlinx.org> wrote:
> subject is the question. for vim vars', maxmem, maxmemtot,
> default is says XX(some os dependent value in kB) or half of memory.
>
> Doesn't say if it picks smallest or largest.
>
> Like: for read-only files , only create a swapfile
> if it needs more than the given 'maxmem' or 'maxtotmem'.
>
> Might make sense in some cases to use .5*(totmem), but
> not so much these days. Might make more sense to use
> .5*(tot_availmem), but even that might not be good on
> systems with many background processes that vary, largely
> on the amount of memory used.
>
> So first Q is, "for default, does it use the smaller or larger
> value?"
>
> If it uses "freemem", does it add the cache-memory
> back to 'free' to get the "real free"
>
> Thanks

The value may depend on your installed memory and on your CPU's
wordsize. On my 64-bit machine with 8 GiB RAM, both 'maxmem' and
'maxmemtot' say 4015288 KiB. I think this "default: between 256 to
5120 (for 'maxmem') and between 2048 and 10240 (for 'maxmemtot'),
system dependent" mentioned in the help is a leftover from a time when
RAM sizes were much smaller than they are now.

But these maximum values are usually not reached: at the moment, the
Gnome System Monitor tells me that gvim is using 18 MiB, not 4 GiB,
and yet I have 10 windows open.

I don't know about buffers and cache. I suppose these two settings are
set at Vim startup and don't follow the evolution of memory use.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment