How do I limit CPU cores in Linux?
Answer
To specify the number of CPU cores present on the system, use
the –cpu or -c flag (this is normally detected automatically). Rather than limit a process’s CPU usage, we can kill it with the –kill or -k option.