Comments (14)
is memcg compiled into the kernel? Can you manually mount a cgroupfs with
-o memory ?
On Wed, Oct 9, 2013 at 11:35 AM, Nat Welch [email protected] wrote:
$ sudo lmctfy init "
cgroup_mount:{
mount_path:'/dev/cgroup/cpu'
hierarchy:CGROUP_CPU hierarchy:CGROUP_CPUACCT
}
cgroup_mount:{
mount_path:'/dev/cgroup/cpuset' hierarchy:CGROUP_CPUSET
}
cgroup_mount:{
mount_path:'/dev/cgroup/freezer' hierarchy:CGROUP_FREEZER
}
cgroup_mount:{
mount_path:'/dev/cgroup/memory' hierarchy:CGROUP_MEMORY
}"
Command exited with error message: 9: Failed to mount hierarchy with ID "memory" at "/dev/cgroup/memory"$ lmctfy -v
lmctfy version 0.1-0$ uname -a
Linux byok 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/LinuxI'm running on Google Compute Engine. ([email protected] if you wanna
talk off bug about how to replicate this).—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8
.
from lmctfy.
The output of /proc/cgroups may be useful as well.
from lmctfy.
It's default debian kernel.
lsmod
Module Size Used by
fuse 62020 0
btrfs 505636 0
libcrc32c 12426 1 btrfs
zlib_deflate 25638 1 btrfs
ufs 58774 0
qnx4 13184 0
hfsplus 71616 0
hfs 45877 0
minix 27623 0
ntfs 163882 0
vfat 17316 0
msdos 17077 0
fat 45642 2 msdos,vfat
jfs 137196 0
xfs 590895 0
reiserfs 192132 0
ext3 162072 0
jbd 56902 1 ext3
ext2 59231 0
efivars 17916 0
dm_mod 63645 0
snd_pcsp 13742 0
snd_pcm 68083 1 snd_pcsp
snd_page_alloc 13003 1 snd_pcm
snd_timer 22917 1 snd_pcm
crc32c_intel 12747 1
i2c_piix4 12536 0
snd 52889 3 snd_timer,snd_pcm,snd_pcsp
ghash_clmulni_intel 13173 0
evdev 17562 1
processor 28157 0
soundcore 13065 1 snd
thermal_sys 18040 1 processor
i2c_core 23876 1 i2c_piix4
aesni_intel 50667 0
aes_x86_64 16843 1 aesni_intel
aes_generic 33026 2 aes_x86_64,aesni_intel
button 12937 0
cryptd 14517 2 aesni_intel,ghash_clmulni_intel
ext4 350763 1
crc16 12343 1 ext4
jbd2 62115 1 ext4
mbcache 13114 3 ext4,ext2,ext3
sg 25874 0
sd_mod 36136 2
crc_t10dif 12348 1 sd_mod
virtio_scsi 13319 1
virtio_net 17808 0
scsi_mod 162269 3 virtio_scsi,sd_mod,sg
virtio_pci 13207 0
virtio_ring 13057 3 virtio_pci,virtio_net,virtio_scsi
virtio 13093 4 virtio_ring,virtio_pci,virtio_net,virtio_scsi
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 2 1 1
cpu 1 1 1
cpuacct 1 1 1
memory 0 1 0
devices 0 1 1
freezer 3 1 1
net_cls 0 1 1
blkio 0 1 1
perf_event 0 1 1
I don't know enough about cgroups. How do I manually mount one?
from lmctfy.
To mount, as root: mount -t cgroup none {some dir to mount to} -o memory
from lmctfy.
http://cl.natw.me/Rr0L is the build config file that was in /boot.
from lmctfy.
root@byok:~# mount -t cgroup none /mnt -o memory
mount: special device none does not exist
from lmctfy.
What is currently mounted btw? Can you run: cat /proc/mounts | grep cgroup
from lmctfy.
You should give him a full command :)
thockin@flaptop:~$ mkdir /tmp/mem
thockin@flaptop:~$ sudo mount -t cgroup cgroup /tmp/mem -o memory
[sudo] password for thockin:
thockin@flaptop:~$ ls /tmp/mem
cgroup.clone_children memory.move_charge_at_immigrate
cgroup.event_control memory.numa_stat
cgroup.procs memory.oom_control
memory.failcnt memory.soft_limit_in_bytes
memory.force_empty memory.stat
memory.limit_in_bytes memory.swappiness
memory.max_usage_in_bytes memory.usage_in_bytes
memory.memsw.failcnt memory.use_hierarchy
memory.memsw.limit_in_bytes notify_on_release
memory.memsw.max_usage_in_bytes release_agent
memory.memsw.usage_in_bytes tasks
On Wed, Oct 9, 2013 at 11:48 AM, Victor Marmol [email protected]:
To mount, as root: mount -t cgroup none -o memory
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-25997582
.
from lmctfy.
$ mkdir /tmp/mem; sudo mount -t cgroup cgroup /tmp/mem -o memory; ls /tmp/mem
mount: special device cgroup does not exist
That sounds like I don't have cgroup support?
But this looks slightly more promising:
$ cat /proc/mounts | grep cgroup
cgroup /dev/cgroup/cpu cgroup rw,relatime,cpuacct,cpu 0 0
cgroup /dev/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
cgroup /dev/cgroup/freezer cgroup rw,relatime,freezer 0 0
from lmctfy.
Seems like it doesn't have support for memcg. From the config it looks like memcg is disabled:
CONFIG_CGROUP_MEM_RES_CTLR=y
CONFIG_CGROUP_MEM_RES_CTLR_DISABLED=y
and it looks like Docker reached a similar conclusions with the default Debian kernel:
from lmctfy.
Try a reboot with "cgroup_enable=memory" on your kernel commandline?
I had to go google the meaning of the _DISABLED param, but that seems tobe
what it means. Compiled in, but disabled by default.
On Wed, Oct 9, 2013 at 11:59 AM, Victor Marmol [email protected]:
Seems like it doesn't have support for memcg. From the config it looks
like memcg is disabled:CONFIG_CGROUP_MEM_RES_CTLR=y
CONFIG_CGROUP_MEM_RES_CTLR_DISABLED=y—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-25998428
.
from lmctfy.
Awesome, I rebooted with that option (as described here: https://wiki.debian.org/LXC#Prepare_the_host) and it worked!
natwelch@byok:~$ sudo lmctfy init "
> cgroup_mount:{
> mount_path:'/dev/cgroup/cpu'
> hierarchy:CGROUP_CPU hierarchy:CGROUP_CPUACCT
> }
> cgroup_mount:{
> mount_path:'/dev/cgroup/cpuset' hierarchy:CGROUP_CPUSET
> }
> cgroup_mount:{
> mount_path:'/dev/cgroup/freezer' hierarchy:CGROUP_FREEZER
> }
> cgroup_mount:{
> mount_path:'/dev/cgroup/memory' hierarchy:CGROUP_MEMORY
> }"
natwelch@byok:~$ sudo lmctfy create test "memory:{limit:100000000}"
natwelch@byok:~$ sudo lmctfy list containers
name="/test"
natwelch@byok:~$ sudo lmctfy run test "echo hello world"
hello world
exit_code="0"
Thanks guys!
from lmctfy.
Could you please add this knowledge to the documentation. As it is know spread in a closed issue is hard to find.
from lmctfy.
mars@node1:/community/cookbooks$ sudo mount -t cgroup -o debug cgroup /cgroup/community/cookbooks$ sudo mkdir /cgroup
[sudo] password for mars:
mount: mount point /cgroup does not exist
mars@node1:
mars@node1:~/community/cookbooks$ sudo mount -t cgroup -o debug cgroup /cgroup
mount: special device cgroup does not exist
looks like it has no cgroup support, how to enable cgroup for operating system ?
from lmctfy.
Related Issues (17)
- Create proper 0.2.0 release HOT 1
- systemd and future changes in the kernel HOT 1
- Full ContainerSpec documentation HOT 2
- Duplicate SplitStringUsing etc. HOT 2
- Document missing dependencies
- Cannot create containers
- Namespacing HOT 12
- Please tag the 0.5.0 release HOT 1
- lmctfy init fails HOT 2
- swap_limit semantics are confusing
- Failure to create container can leave behind state requiring manual intervention HOT 1
- Using memory controller when swap accounting is disabled HOT 3
- install script fails HOT 1
- where is latest lmctfy? HOT 2
- Please tag 0.1.0 HOT 1
- Not really an issue... HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lmctfy.