[ovs-git] [openvswitch/ovs] b82a90: rhel: limit stack size to 2M.

Flavio Leitner noreply at github.com
Thu Feb 28 19:29:38 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: b82a90e266e1246fe2973db97c95df22558174ea
      https://github.com/openvswitch/ovs/commit/b82a90e266e1246fe2973db97c95df22558174ea
  Author: Flavio Leitner <fbl at sysclose.org>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M rhel/usr_lib_systemd_system_ovs-vswitchd.service.in

  Log Message:
  -----------
  rhel: limit stack size to 2M.

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. */

Acked-By: Timothy Redaelli <tredaelli at redhat.com>
Tested-By: Timothy Redaelli <tredaelli at redhat.com>
Signed-off-by: Flavio Leitner <fbl at sysclose.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list