Redis daemon param

11 views
Skip to first unread message

George Chilumbu

unread,
Oct 17, 2016, 11:49:47 PM10/17/16
to Redis DB
I have a Redis instance running on a multi-core CPU. But Redis being single threaded, i think the multiple cores do not provide any advantage than a single core. So i was thinking that maybe changing the param 'daemonize' to NO, would stop Redis from being single threaded, and in return benefit from the multi-core CPU. Is my thought process right on this? If not, when would it be idea to set daemonize param to NO?


Q2. What would be the best CPU for my Redis? Single core with large cache? or multiple-core as i currently have?

Q3. I have followed the advice from http://redis.io/topics/admin regarding improving memory use, but as shown below, it seems like redis is consuming too much memory and causing swapping. FYI, i have rdb enabled with SAVE '3600 100000'. AOF is disabled.

Below are the details about my CPU and Memory info:

top - 11:43:05 up 14 days, 16:14,  1 user,  load average: 0.98, 0.36, 0.19
Tasks: 178 total,   2 running, 176 sleeping,   0 stopped,   0 zombie
%Cpu(s): 10.0 us,  4.1 sy,  0.0 ni, 85.2 id,  0.2 wa,  0.0 hi,  0.4 si,  0.0 st
KiB Mem:  65966876 total, 59204296 used,  6762580 free,   275524 buffers
KiB Swap:   976892 total,   975440 used,     1452 free. 10548956 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
21929 redis     20   0 45.654g 0.043t   1944 R  99.7 70.8   0:53.82 redis-server
10916 redis     20   0 45.654g 0.043t   2292 S  16.3 70.7   1524:37 redis-server
 7488 root      20   0  529704  14920   4056 S   1.0  0.0  79:48.70 node_exporter
30803 consul    20   0   25744  15296   6140 S   1.0  0.0 191:37.06 consul


ubuntu@redis:~$ lscpu
Architecture:          x86_64
CPU op
-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU
(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node
(s):          2
Vendor ID:             AuthenticAMD
CPU family
:            21
Model:                 1
Stepping:              2
CPU
MHz:               2600.000
BogoMIPS:              5199.93
Virtualization:        AMD-V
L1d cache
:             16K
L1i cache
:             64K
L2 cache
:              2048K
L3 cache
:              6144K
NUMA node0 CPU
(s):     0-15
NUMA node2 CPU
(s):     16-31

And yet more info with sudo lshw -C memory

 
*-cache:0
       description
: L1 cache
       physical id
: 5
       slot
: L1-Cache
       size
: 768KiB
       capacity
: 768KiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-cache:1
       description
: L2 cache
       physical id
: 6
       slot
: L2-Cache
       size
: 16MiB
       capacity
: 16MiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-cache:2
       description
: L3 cache
       physical id
: 7
       slot
: L3-Cache
       size
: 12MiB
       capacity
: 12MiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-cache:0
   description
: L1 cache
       physical id
: 9
       slot
: L1-Cache
       size
: 768KiB
       capacity
: 768KiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-cache:1
       description
: L2 cache
       physical id
: a
       slot
: L2-Cache
       size
: 16MiB
       capacity
: 16MiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-cache:2
       description
: L3 cache
       physical id
: b
       slot
: L3-Cache
       size
: 12MiB
       capacity
: 12MiB
       clock
: 1GHz (1.0ns)
       capabilities
: pipeline-burst internal write-back unified
 
*-memory
       description
: System Memory
       physical id
: 2a
       slot
: System board or motherboard
       size
: 64GiB

Redis Memory and CPU info

ubuntu@redis:~$ redis-cli info memory
# Memory
used_memory
:47210529080
used_memory_human
:43.97G
used_memory_rss
:47759720448
used_memory_rss_human
:44.48G
used_memory_peak
:47293884328
used_memory_peak_human
:44.05G
total_system_memory
:67550081024
total_system_memory_human
:62.91G
used_memory_lua
:37888
used_memory_lua_human
:37.00K
maxmemory
:47244640256
maxmemory_human
:44.00G
maxmemory_policy
:allkeys-lru
mem_fragmentation_ratio
:1.01
mem_allocator
:jemalloc-3.5.1
# CPU
used_cpu_sys
:40991.91
used_cpu_user
:50459.43
used_cpu_sys_children
:24918.73
used_cpu_user_children
:78509.36

Reply all
Reply to author
Forward
0 new messages