How to restrict CPU cores?


#1

Hi,
I’m using MemSQL cluster with many nodes. But the cluster is shared with other systems such as Hadoop. We use YARN to manage the cluster’s resources such as CPUs, Memory, Disk. So I’m wondering if there is any configuration to restrict the number of CPU cores used by MemSQL leaf nodes.
Thanks.

Mingcong Han


#2

although there is no configuration setting for MemSQL, you should be able to use a Linux utility like taskset or cpuset to restrict a process to a certain number of CPUs.

https://linux.die.net/man/1/taskset
http://man7.org/linux/man-pages/man7/cpuset.7.html

having said that, MemSQL does have the ability to set affinity in NUMA environments, although I suspect you are probably asking about a more general case.

let us know about your progress or any other issues that you encounter.


#3

If you want to control how many resources get used by MemSQL for query processing but don’t care about binding MemSQL to specific cores, you can use MemSQL Resource Governor https://docs.memsql.com/operational-manual/v6.7/setting-resource-limits/ to control CPU, concurrency, and memory use.