On Thu, Feb 28, 2019 at 07:28:58PM +0100, Timothy Redaelli wrote: > On Thu, 28 Feb 2019 13:13:57 -0300 > Flavio Leitner <[email protected]> wrote: > > > The default stack size in Fedora/RHEL is 8M, which means when ovs-vswitchd > > daemon starts and uses --mlockall (default), it will dirty all memory > > regions for all threads which is proportionally to the number of CPUs. > > > > On a big host this increases memory usage to many hundreds of megabytes > > while OVS actually requires much less. > > > > This patch relies on systemd to limit to 2M/thread. That is much more > > than the minimum documented at function ovs_thread_create(): > > > > /* Some small systems use a default stack size as small as 80 kB, but > > OVS > > * requires approximately 384 kB according to the following analysis: > > * > > https://mail.openvswitch.org/pipermail/ovs-dev/2016-January/308592.html > > * > > * We use 512 kB to give us some margin of error. */ > > > > Signed-off-by: Flavio Leitner <[email protected]> > > --- > > rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 1 + > > 1 file changed, 1 insertion(+) > > Without the patch: > > # fgrep stack /proc/$(cat /var/run/openvswitch/ovs-vswitchd.pid)/limits > Max stack size 8388608 unlimited bytes > # > > With the patch: > > # fgrep stack /proc/$(cat /var/run/openvswitch/ovs-vswitchd.pid)/limits > Max stack size 2097152 2097152 bytes > # > > Acked-By: Timothy Redaelli <[email protected]> > Tested-By: Timothy Redaelli <[email protected]>
Applied to master, thanks Flavio (and Timothy)! _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
