Skip to content

Instantly share code, notes, and snippets.

@peo3
Created Jan 30, 2011
Embed
What would you like to do?
peo3's libcgroup settings
group browser {
cpu {
cpu.shares = 500;
}
cpuacct {
}
memory {
memory.soft_limit_in_bytes = 400M;
memory.limit_in_bytes = 500M;
}
}
group browser/flash {
cpu {
cpu.shares = 200;
}
cpuacct {
}
memory {
memory.soft_limit_in_bytes = 200M;
memory.limit_in_bytes = 300M;
}
}
group user {
perm {
task {
uid = root;
gid = peo3;
}
admin {
uid = root;
gid = peo3;
}
}
cpu {
# release_agent = /usr/local/sbin/cgroup_clean;
}
cpuacct {
}
blkio {
blkio.weight = 500;
}
}
group noswap {
memory {
memory.swappiness = 0;
}
}
group bgjob {
perm {
task {
uid = root;
gid = peo3;
}
admin {
uid = root;
gid = root;
}
}
cpu {
cpu.shares = 10;
}
cpuacct {
}
blkio {
blkio.weight = 100;
}
memory {
memory.soft_limit_in_bytes = 100M;
memory.limit_in_bytes = 200M;
memory.swappiness = 100;
}
}
group bgjob/restricted {
perm {
task {
uid = root;
gid = peo3;
}
admin {
uid = root;
gid = peo3;
}
}
cpu {
}
cpuacct {
}
freezer {
}
}
mount {
cpu = /dev/cgroup/cpu;
cpuacct = /dev/cgroup/cpu;
memory = /dev/cgroup/memory;
blkio = /dev/cgroup/blkio;
freezer = /dev/cgroup/freezer;
}
peo3:firefox-4.0-bin cpu,memory browser
peo3:google-chrome cpu,memory browser
peo3:firefox-bin cpu,memory browser
peo3:plugin-container cpu,memory browser/flash
peo3:ibus-engine-mozc memory noswap
peo3:update-manager cpu,blkio,memory bgjob
peo3:software-center cpu,blkio,memory bgjob
peo3:dropbox cpu,blkio,memory bgjob
peo3:gwibber-service cpu,blkio,memory bgjob
peo3:tracker-store cpu,blkio,memory bgjob
peo3:tracker-extract cpu,blkio,memory bgjob
peo3:tracker-miner-fs cpu,blkio,memory bgjob
lastfm:lastfmsubmitd cpu,blkio,memory bgjob
#root:cron cpu,blkio,memory bgjob
root:anacron cpu,blkio,memory bgjob
root:aptd cpu,blkio,memory bgjob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment