Ticket 3526 - add TasksMax to systemd service files
Summary: add TasksMax to systemd service files
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Build System and Packaging (show other tickets)
Version: 17.11.x
Hardware: Linux Linux
: --- 4 - Minor Issue
Assignee: Danny Auble
QA Contact:
URL:
: 4005 (view as ticket list)
Depends on:
Blocks:
 
Reported: 2017-03-02 11:52 MST by Tim Wickberg
Modified: 2017-07-18 10:22 MDT (History)
4 users (show)

See Also:
Site: SchedMD
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 17.11.0-pre1
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
Proposal of adding TasksMax to systemd service files (1.41 KB, patch)
2017-04-11 10:28 MDT, Felip Moll
Details | Diff
Patch for conditionally modify systemd unit files (3.06 KB, patch)
2017-04-19 07:31 MDT, Felip Moll
Details | Diff
Patch for conditionally modify systemd unit files (3.06 KB, patch)
2017-04-19 07:43 MDT, Felip Moll
Details | Diff

Note You need to log in before you can comment on or make changes to this ticket.
Description Tim Wickberg 2017-03-02 11:52:27 MST
systemd is going to start restricting the number of processes/threads for services:

https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP2/#fate-320358

It looks like setting TasksMax in our services file will suffice, although it is currently unclear to me what happens if you have this set in a service file with an older systemd running - if it's silently ignored then this should be safe to add throughout, otherwise we're heading down a path of needing to identify specific systemd versions or capabilities.
Comment 3 Felip Moll 2017-04-11 10:28:42 MDT
Created attachment 4337 [details]
Proposal of adding TasksMax to systemd service files

Hello,

We had problems with this TasksMax not being set in SUSE 12 SP2 so we set it to "TasksMax=infinity" and it solved the problem.

systemd version in SUSE is systemd-228-117.12.x86_64

I tested it in a CentOS 7 with an older systemd:

systemd-219-30.el7_3.6.x86_64

And it is complaining:

/var/log/messages:Apr 11 18:09:54 moll-archive24 systemd: [/usr/lib/systemd/system/slurm.service:12] Unknown lvalue 'TasksMax' in section 'Service'

The TasksMax value were introduced in systemd in version 226. All versions below 225 will complain despite the service starts correctly.

Moreover this value is used when kernel is 4.3 or higher.

- The feature is announced here: https://github.com/systemd/systemd/blob/master/NEWS#L1688
- Pull request introduced here: https://github.com/systemd/systemd/pull/1239
- Default values set here: https://github.com/systemd/systemd/pull/1886


My first suggestion is to add this TasksMax to the service files as newer versions of systemd will start being deployed.

My second suggestion is not to touch this parameter and keep defaults, but comment it in the administrator documentation or maybe in the tunning guide.


Best regards,

Barcelona Supercomputing Center
Felip M
Comment 4 Tim Wickberg 2017-04-11 12:09:22 MDT
Thanks for the background Felip, that helps a lot.

It does look like we'd need a way to detect the systemd version at install time, and conditionally enable it on newer platforms.
Comment 8 Felip Moll 2017-04-19 07:31:44 MDT
Created attachment 4372 [details]
Patch for conditionally modify systemd unit files

Hi Alex,

I am sending a patch that creates a macro in auxdir/x_ac_systemd.m4 in order to check wether the installed systemd corresponds to a 226 version or greater. If so, then TasksMax parameter is included in slurmd and slurmctld unit files.

You must run autogen.sh to recreate Makefile.in's and configure.

Hope it helps.

Best regards,
Felip M
Comment 9 Felip Moll 2017-04-19 07:43:09 MDT
Created attachment 4373 [details]
Patch for conditionally modify systemd unit files

Corrected patch, systemd version to check must be greater or equal to 227, not 226.
Comment 10 Alejandro Sanchez 2017-04-19 07:44:28 MDT
Thanks Felip. We're gonna take a look at this and will come back to you.
Comment 22 Danny Auble 2017-06-16 11:53:00 MDT
A modified version of this has been checked into master

commits

b19fbf3ba579
2ef36b04ea47
dc54d5462b9d

ran autogen.sh

6a9f84978b82d

Please reopen if you feel/see anything out of place.
Comment 25 Danny Auble 2017-06-19 08:57:38 MDT
Sorry those hashes are

df2306ff5f
02aa5a1a20
30982991b8

868aefdc97
Comment 26 Danny Auble 2017-07-18 10:22:05 MDT
*** Ticket 4005 has been marked as a duplicate of this ticket. ***