cgroup/control group config problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i did the following to setup a cgroup, but when I test "it" doesn't
kill the pid, anyone get this working? must be missing
something...program mallocs 32GB...much thanks for advise!

::install::

yum install libcgroup-tools libcgroup

::config::

cd /sys/fs/cgroup/memory
mkdir alpha
echo 4096000000 > alpha/memory.limit_in_bytes
cat alpha/memory.limit_in_bytes
change /etc/cgrules.conf add line:
@users       memory    alpha/
start: cgrulesengd

::test::

check if pid is in alpha/tasks:
cat /sys/fs/cgroup/memory/alpa/tasks
run:
cat > memlimit.c <<"END"
#include <stdlib.h>
#include <stdio.h>
#define  ONEGB  1073741824
int main(void) {
    int i;
    for (i=0; i < 32; i++) {
        char *q = malloc(ONEGB);
        printf ("Malloced: %d / GB\n", (i+1));
    }
    sleep(9999999);
}
END
gcc memlimit.c && ./a.out
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux