Home> Database> Redis> body text

Does replacing redis require a restart?

anonymity
Release: 2019-06-04 16:49:23
Original
2253 people have browsed it

Redis is an open source log-type Key-Value database written in ANSI C language, supports network, can be memory-based and persistent, and provides APIs in multiple languages.

Does replacing redis require a restart?

How to restart the redis service

If you installed redis with apt-get or yum install, You can stop/start/restart redis directly through the following commands

/etc/init.d/redis-server stop

##/etc/init.d/redis-server start

/etc/init.d/redis-server restart

If redis is installed through source code, you can restart redis through the shutdown command of the redis client program redis-cli

redis-cli -h 127.0.0.1 -p 6379 shutdown


If none of the above methods successfully stop redis, you can use the ultimate weapon kill -9

Restarting is only required when changing the following three configurations:

1.appendfsync no

appendfsync This is no, redis will not actively call fsync to synchronize the log to the disk. At this time , depending on the operating system, most Linux operating systems call fsync every 30s to synchronize the buffer log to the disk


2.appendfsync everysec

redis every 1 second , call fsync to write the buffer data to the disk. If fsync exceeds 1, fsync will be delayed to the second second, but up to 2s,

3.appendfsync always

each For write operations, redis will call fsync to write the buffer data to the disk. This is the safest data, but the performance will decrease!

The above is the detailed content of Does replacing redis require a restart?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!