- 02 May, 2020 1 commit
-
-
zhenwei pi authored
Currently, there are several types of threads/child processes of a redis server. Sometimes we need deeply optimise the performance of redis, so we would like to isolate threads/processes. There were some discussion about cpu affinity cases in the issue: https://github.com/antirez/redis/issues/2863 So implement cpu affinity setting by redis.conf in this patch, then we can config server_cpulist/bio_cpulist/aof_rewrite_cpulist/ bgsave_cpulist by cpu list. Examples of cpulist in redis.conf: server_cpulist 0-7:2 means cpu affinity 0,2,4,6 bio_cpulist 1,3 means cpu affinity 1,3 aof_rewrite_cpulist 8-11 means cpu affinity 8,9,10,11 bgsave_cpulist 1,10-11 means cpu affinity 1,10,11 Test on linux/freebsd, both work fine. Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com>
-
- 20 Apr, 2020 1 commit
-
-
antirez authored
Strange enough, pthread_setname_np() produces a warning for not defined function even if pthread is included. Moreover the MacOS documentation claims the return value for the function is void, but actually is int. Related to #7089.
-
- 18 Apr, 2020 1 commit
-
-
zhenwei pi authored
Set thread name for each thread of redis-server, this helps us to monitor the utilization and optimise the performance. And suggested-by Salvatore, implement this feature for multi platforms. Currently support linux and bsd, ignore other OS. An exmaple on Linux: # top -d 5 -p `pidof redis-server ` -H PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3682671 root 20 0 227744 8248 3836 R 99.2 0.0 0:19.53 redis-server 3682677 root 20 0 227744 8248 3836 S 26.4 0.0 0:04.15 io_thd_3 3682675 root 20 0 227744 8248 3836 S 23.6 0.0 0:03.98 io_thd_1 3682676 root 20 0 227744 8248 3836 S 23.6 0.0 0:03.97 io_thd_2 3682672 root 20 0 227744 8248 3836 S 0.2 0.0 0:00.02 bio_close_file 3682673 root 20 0 227744 8248 3836 S 0.2 0.0 0:00.02 bio_aof_fsync 3682674 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 bio_lazy_free 3682678 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd 3682682 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd 3682683 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd 3682684 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd 3682685 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd 3682687 root 20 0 227744 8248 3836 S 0.0 0.0 0:00.00 jemalloc_bg_thd Another exmaple on FreeBSD-12.1: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5212 root 100 0 48M 7280K CPU2 2 0:26 99.52% redis-server{redis-server} 5212 root 38 0 48M 7280K umtxn 4 0:06 26.94% redis-server{io_thd_3} 5212 root 36 0 48M 7280K umtxn 6 0:06 26.84% redis-server{io_thd_1} 5212 root 39 0 48M 7280K umtxn 1 0:06 25.30% redis-server{io_thd_2} 5212 root 20 0 48M 7280K uwait 3 0:00 0.00% redis-server{redis-server} 5212 root 21 0 48M 7280K uwait 2 0:00 0.00% redis-server{bio_close_file} 5212 root 21 0 48M 7280K uwait 3 0:00 0.00% redis-server{bio_aof_fsync} 5212 root 21 0 48M 7280K uwait 0 0:00 0.00% redis-server{bio_lazy_free} Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com>
-
- 25 Nov, 2018 2 commits
-
-
David Carlier authored
Special treatment here as backtrace support is optional, cannot be found via pkg-config and similar neither.
-
David Carlier authored
FreeBSD/DragonFlyBSD does have backtrace only it does not belong to libc.
-
- 15 Mar, 2018 1 commit
-
-
zhaozhao.zz authored
-
- 23 Feb, 2017 1 commit
-
-
Salvatore Sanfilippo authored
-
- 19 Feb, 2017 2 commits
-
-
Salvatore Sanfilippo authored
However note that in architectures supporting 64 bit unaligned accesses memcpy(...,...,8) is likely translated to a simple word memory movement anyway.
-
Salvatore Sanfilippo authored
-
- 10 Feb, 2015 1 commit
-
-
antirez authored
Related to issue #2372.
-
- 07 Feb, 2015 1 commit
-
-
Mariano Pérez Rodríguez authored
Fixing #2371 as per @mattsta's suggestion
-
- 03 Feb, 2015 1 commit
-
-
antirez authored
Backtrace is a glibc extension, while setproctitle() implementation depends on the memory layout and is partially libc dependent.
-
- 11 Dec, 2014 1 commit
-
-
antirez authored
-
- 04 Dec, 2014 1 commit
-
-
antirez authored
-
- 08 Aug, 2014 1 commit
-
-
Samuel Chou authored
[I had to split out the clang check due to clang *really* not liking the __GLIBC_PREREQ macro; -matt] Closes #1456
-
- 26 Jun, 2014 1 commit
-
-
Matt Stancliff authored
From mailing list post https://groups.google.com/forum/#!topic/redis-db/D3k7KmJmYgM In the file “config.h”, the definition HAVE_ATOMIC is used to indicate if an architecture on which redis is implemented supports atomic synchronization primitives. Powerpc supports atomic synchronization primitives, however, it is not listed as one of the architectures supported in config.h. This patch adds the __powerpc__ to the list of architectures supporting these primitives. The improvement of redis due to the atomic synchronization on powerpc is significant, around 30% to 40%, over the default implementation using pthreads. This proposal adds __powerpc__ to the list of architectures designated to support atomic builtins.
-
- 07 May, 2014 1 commit
-
-
antirez authored
-
- 27 Feb, 2013 1 commit
-
-
Stam He authored
This cased a segfault in some Linux system and was GCC-specific. Commit modified by @antirez: 1) Stripped away the part to set the proc title via config for now. 2) Handle initialization of setproctitle only when the replacement is used. 3) Don't require GCC now that the attribute constructor is no longer used.
-
- 26 Feb, 2013 1 commit
-
-
antirez authored
This commit allows Redis to set a process name that includes the binding address and the port number in order to make operations simpler. Redis children processes doing AOF rewrites or RDB saving change the name into redis-aof-rewrite and redis-rdb-bgsave respectively. This in general makes harder to kill the wrong process because of an error and makes simpler to identify saving children. This feature was suggested by Arnaud GRANAL in the Redis Google Group, Arnaud also pointed me to the setproctitle.c implementation includeed in this commit. This feature should work on all the Linux, OSX, and all the three major BSD systems.
-
- 21 Jan, 2013 1 commit
-
-
antirez authored
I don't know how to test for Open Solaris that has support for backtrace() so for now removing the #ifdef that breaks compilation under other Solaris flavors.
-
- 11 Dec, 2012 1 commit
-
-
antirez authored
Config.h performs endianess detection including OS-specific headers to define the endianess macros, or when this is not possible, checking the processor type via ifdefs. Sometimes when the OS-specific macro is included, only __BYTE_ORDER is defined, while BYTE_ORDER remains undefined. There is code at the end of config.h endianess detection in order to define the macros without the underscore, but it was not working correctly. This commit fixes endianess detection fixing Redis on Linux / PPC64 and possibly other systems.
-
- 21 Nov, 2012 1 commit
-
-
antirez authored
-
- 08 Nov, 2012 1 commit
-
-
antirez authored
-
- 26 Oct, 2012 1 commit
-
-
antirez authored
-
- 25 Oct, 2012 2 commits
- 28 Aug, 2012 1 commit
-
-
antirez authored
This fixes issue #539. Basically if there is enough free memory the OS may buffer the RDB file that the slave transfers on disk from the master. The file may actually be flused on disk at once by the operating system when it gets closed by Redis, causing the close system call to block for a long time. This patch is a modified version of one provided by yoav-steinberg of @garantiadata (the original version was posted in the issue #539 comments), and tries to flush the OS buffers incrementally (every 8 MB of loaded data).
-
- 15 May, 2012 1 commit
-
-
Dave Pacheco authored
-
- 11 Apr, 2012 1 commit
-
-
Pieter Noordhuis authored
-
- 26 Feb, 2012 2 commits
-
-
Jakub Wieczorek authored
-
Premysl Hruby authored
-
- 21 Feb, 2012 1 commit
-
-
Pieter Noordhuis authored
-
- 20 Jun, 2011 1 commit
-
-
antirez authored
-
- 05 May, 2011 2 commits
-
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
-
- 09 Mar, 2011 2 commits
- 23 Oct, 2010 2 commits
-
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
Also, use tcmalloc functions explicitly via macros to prevent symbol lookups to resolve to native malloc/free on OSX.
-
- 02 Sep, 2010 1 commit
-
-
antirez authored
-