On Wed, Jun 30, 2021 at 3:01 AM Benoit Ganne (bganne) <[email protected]> wrote:
> > What I'm trying to figure out is this: do I need to try and determine a > > formula for the sizes that should be used for main heap and stat segment > > based on X number of routes and Y number of worker threads? Or is there a > > downside to just setting the main heap size to 32G (which seems like a > > number that is unlikely to ever be exhausted sans memory leaks)? > > I do not think it would be a good idea: > - it depends upon overcommit configuration: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/vm/overcommit-accounting.rst > - under the default overcommit setting ("heuristic") this would prevent > small configs to run VPP by default: think developer VMs or smaller cloud > instances (eg. AWS C5n.large are 4GB) which are pretty common > > Maybe having an (optional) dyncamically growing heap could be a better > option? > > ben > Hi Ben, Ah, thanks for the pointer! Yes, allowing dynamic heap growth sounds like it could be better. Alternatively... if memory allocations could fail and something more graceful than VPP exiting could occur, that may also be better. E.g. if I'm adding a route and try to allocate a counter for it and that fails, it would be better to refuse to add the route than to exit and take the network down. I realize that neither of those options is easy to do btw. I'm just trying to figure out how to make it easier and more forgiving for users to set up their configuration without making them learn about various memory parameters. Thanks, -Matt
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19656): https://lists.fd.io/g/vpp-dev/message/19656 Mute This Topic: https://lists.fd.io/mt/83856384/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
