Can't limit CPU on LXC?

I’m trying to use LXC containers, which work, but when trying to limit CPU usage nothing happens and they can still use all of the CPU.