[systemd-bugs] [Bug 78738] New: Setting MemoryLimit does not imply "MemoryAccounting=true"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 15 05:20:30 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=78738

          Priority: medium
            Bug ID: 78738
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: Setting MemoryLimit does not imply
                    "MemoryAccounting=true"
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: andy.melnikov at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

http://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
says that MemoryLimit implies "MemoryAccounting=true".

But it's not the case. If I don't put an explicit "MemoryAccounting=true" in
the unit file below, service control groups under memory is not created and
memory limit doesn't work.

----
[Unit]
Description=foo
After=network.target

[Service]
User=bar
WorkingDirectory=/home/bar
ExecStart=/usr/bin/foo
Restart=always
RestartSec=5min
MemoryLimit=256M

[Install]
WantedBy=multi-user.target
----

[root at quux ~]# systemctl show foo -p MemoryLimit
MemoryLimit=268435456
[root at quux ~]# systemctl show foo -p MemoryAccounting
MemoryAccounting=no

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140515/50159311/attachment.html>


More information about the systemd-bugs mailing list