Hi!

See comment below, marked AndersW>

regards,

Anders Widell


On 02/27/2018 09:07 AM, Hans Nordebäck wrote:
Hi Anders, a question below. /Regards Hans


On 02/26/2018 02:47 PM, Anders Widell wrote:
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..c0661f845 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 $(pkg-config --version systemd) -ge 227; then
[HansN] is this test correct? It seems to test which pkg-config version? Shouldn't it be --modversion?

AndersW> You're right! It turns out, I tested this on Fedora 26 which uses pkgconf instead of pkg-config:

https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation

I will change this to --atleast-version which seems to be compatible with both versions.

+ 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




------------------------------------------------------------------------------
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

Reply via email to