Show CPUs currently available to an instance:
lxc-cgroup -n ol6ctr1 cpuset.cpus
0-7
Limit CPU time and block I/O
lxc-cgroup -n ol6ctr2 cpu.shares 256
lxc-cgroup -n ol6ctr2 blkio.weight 500
Limit RAM
lxc-cgroup -n ol6ctr2 memory.soft_limit_in_bytes 268435456
lxc-cgroup -n ol6ctr2 memory.limit_in_bytes 536870912
The settings can be made permanent by setting them in the lxc instance's config file, e.g.,
lxc.cgroup.cpuset.cpus=0,1
lxc.cgroup.memory.soft_limit_in_bytes=
268435456
lxc.cgroup.memory.limit_in_bytes=
536870912
The oracle article has a typo for the memory.limit_in_bytes example, it was missing the last digit (2). Fixed here.