When using systemd version 227 or later, set the option TasksMax for OpenSAF to inifinity. This option specifies the maximum number of processes and threads within the control group for the OpenSAF service. The reason why OpenSAF needs a large number of processes and threads is that all application processes started by AMF are running within the same control group, unless they explicitly move out of it. --- configure.ac | 21 ++++++++++++++------- src/nid/opensafd.service.in | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac index 1fd2b91db..12a5d5c5a 100644 --- a/configure.ac +++ b/configure.ac @@ -286,19 +286,26 @@ AC_SUBST([TIPC_TRANSPORT_ENABLED], ["$enable_tipc"]) # # Enable/disable use of systemd # -PKG_CHECK_MODULES([SYSTEMD], [systemd], [enable_systemd=yes], [enable_systemd=no]) - +PKG_CHECK_MODULES([SYSTEMD], [systemd >= 219], [enable_systemd=yes], + [enable_systemd=no]) + if test "$enable_systemd" = yes; then - PKG_CHECK_MODULES([SYSTEMD], [systemd]) - AC_DEFINE([ENABLE_SYSTEMD], 1, [Define if systemd is enabled]) - systemdunitdir=$(pkg-config --variable=systemdsystemunitdir systemd) - systemdversion=$(pkg-config --modversion systemd) + AC_DEFINE([ENABLE_SYSTEMD], 1, [Define if systemd is enabled]) + systemdunitdir=$(pkg-config --variable=systemdsystemunitdir systemd) + systemdversion=$(pkg-config --modversion systemd) + if test "$systemdversion" -ge 227; then + systemdtasksmax="TasksMax=infinity"$'\n' + else + systemdtasksmax="" + fi fi - + AM_CONDITIONAL([ENABLE_SYSTEMD], [test "$enable_systemd" = yes]) AC_SUBST([SYSTEMD_ENABLED], ["$enable_systemd"]) AC_SUBST([systemdsystemunitdir], ["$systemdunitdir"]) AC_SUBST([systemdmodversion], ["$systemdversion"]) +AC_SUBST([systemdtasksmax], ["$systemdtasksmax"]) +AM_SUBST_NOTMAKE([systemdtasksmax]) # # Enable/disable building the OpenSAF tests diff --git a/src/nid/opensafd.service.in b/src/nid/opensafd.service.in index 35f290d8d..7f4d75ee3 100644 --- a/src/nid/opensafd.service.in +++ b/src/nid/opensafd.service.in @@ -11,6 +11,6 @@ PIDFile=@localstatedir@/run/opensaf/osafamfnd.pid ControlGroup=cpu:/ TimeoutStartSec=3hours KillMode=none - +@systemdtasksmax@ [Install] WantedBy=multi-user.target -- 2.13.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
