Does redis bind to CPU cores automatically? -
i have server 32 logical cores(16 physical cores , hyper-thread enabled) , have 8 redis instances on it. seems 16 cores, id 0 7 , 16 23, used , other 16 cores idled. shows cpu affinity mask redis process ffffffff(from taskset -p pid).
so wonder cpu affinity has been set automatically in redis?
thanks
leo
no, redis doesn't set cpu affinity. think misunderstand output of taskset command.
the affinity mask got, i.e. ffffffff
, means process might running on of processors. , that's default behavior. can test starting process doesn't set cpu affinity, e.g. vim xxx.conf
, , use taskset
check mask. should return ffffffff
.
in order make process running on specific cpu, can run following command: taskset -pc 0 process_id
, i.e. running on 0th
processor.
Comments
Post a Comment