Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4efb25d9
Commit
4efb25d9
authored
May 04, 2020
by
antirez
Browse files
Rework a bit the documentation for CPU pinning.
parent
d6436eb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
4efb25d9
...
@@ -1782,17 +1782,27 @@ rdb-save-incremental-fsync yes
...
@@ -1782,17 +1782,27 @@ rdb-save-incremental-fsync yes
# the main dictionary scan
# the main dictionary scan
# active-defrag-max-scan-fields 1000
# active-defrag-max-scan-fields 1000
# Redis server/IO threads, bio threads, aof rewrite child process, and bgsave
# It is possible to pin different threads and processes of Redis to specific
# child process cpu affinity list config. syntax of cpu list looks like taskset
# CPUs in your system, in order to maximize the performances of the server.
# command. serveral examples:
# This is useful both in order to pin different Redis threads in different
# set redis server/io threads to cpu affinity 0,2,4,6
# CPUs, but also in order to make sure that multiple Redis instances running
# in the same host will be pinned to different CPUs.
#
# Normally you can do this using the "taskset" command, however it is also
# possible to this via Redis configuration directly, both in Linux and FreeBSD.
#
# You can pin the server/IO threads, bio threads, aof rewrite child process, and
# the bgsave child process. The syntax to specify the cpu list is the same as
# the taskset command:
#
# Set redis server/io threads to cpu affinity 0,2,4,6:
# server_cpulist 0-7:2
# server_cpulist 0-7:2
#
#
#
s
et bio threads to cpu affinity 1,3
#
S
et bio threads to cpu affinity 1,3
:
# bio_cpulist 1,3
# bio_cpulist 1,3
#
#
#
s
et aof rewrite child process to cpu affinity 8,9,10,11
#
S
et aof rewrite child process to cpu affinity 8,9,10,11
:
# aof_rewrite_cpulist 8-11
# aof_rewrite_cpulist 8-11
#
#
#
s
et bgsave child process to cpu affinity 1,10,11
#
S
et bgsave child process to cpu affinity 1,10,11
# bgsave_cpulist 1,10-11
# bgsave_cpulist 1,10-11
src/setcpuaffinity.c
View file @
4efb25d9
/* ==========================================================================
/* ==========================================================================
* set
proctitle
.c - Linux/BSD setcpuaffinity.
* set
cpuaffinity
.c - Linux/BSD setcpuaffinity.
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* Copyright (C) 2020 zhenwei pi
* Copyright (C) 2020 zhenwei pi
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment