当前位置:网站首页>Redis single thread problem forced sorting layman literacy
Redis single thread problem forced sorting layman literacy
2022-07-03 15:11:00 【Miss, do you fix the light bulb】
1. Many people say Redis Single thread performance is very high , Asked about Redis Is it single threaded , Just answer yes . Feel your feet and think , How can one Redis The service is just a thread working . If you don't understand, ask , What's going on
Redis Single thread means Redis Network of IO And the read-write process is completed by a thread , And this wind makes our business most concerned about , That is to say Redis The main process of providing external key value storage , So it is called single thread .
however Redis Other functions of , Data persistence AOF perhaps RDB, Delete data asynchronously , Cluster synchronization data is handled by additional threads .
2.Redis Why can a single thread be so fast ?
The explanation is very simple ,Redis All data of is in memory , Your relational databases are on disk , The reading speed is not an order of magnitude , Do you think he is fast . Another point is that single thread avoids the fatal problem of multithreading , That is online text switching , If it is multithreaded design , My memory reading and writing speed is extremely high , If I read a key value that is 1 nanosecond , As a result, you need to switch between online and offline texts 10 millisecond , Are you sick , I TM Go to the bank to check your deposit , You told me to wait until the manager who opened my account came to check ,30 Mi's knife is beside you , Just ask if you can pull out the knife .
3.Redis How to handle so many concurrent client connections with a single thread ?
Redis Of IO Multiplexing ,Redis utilize epoll To achieve IO Multiplexing , Put the connection information and time in the queue , Then it is handed over to the event distribution processor in turn . Can be in Redis Of redis.config View the maximum number of connections in
command :config get maxclients
边栏推荐
- 【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
- Byte practice plane longitude 2
- C # realizes the login interface, and the password asterisk is displayed (hide the input password)
- Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
- Besides lying flat, what else can a 27 year old do in life?
- Halcon与Winform学习第二节
- 什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?
- Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
- Can‘t connect to MySQL server on ‘localhost‘
- What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding
猜你喜欢

北京共有产权房出租新规实施的租赁案例

什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
![Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)](/img/cd/2e4f5884d034ff704809f476bda288.png)
Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)

视觉上位系统设计开发(halcon-winform)-1.流程节点设计

4-33--4-35

视觉上位系统设计开发(halcon-winform)-3.图像控件

Troubleshooting method of CPU surge

【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》

High quality workplace human beings must use software to recommend, and you certainly don't know the last one

Yolov5系列(一)——網絡可視化工具netron
随机推荐
XWiki安装使用技巧
4-33--4-35
视觉上位系统设计开发(halcon-winform)-1.流程节点设计
4-20-4-23 concurrent server, TCP state transition;
Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
Kubernetes帶你從頭到尾捋一遍
Several sentences extracted from the book "leather bag"
Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)
Construction of operation and maintenance system
ASTC texture compression (adaptive scalable texture compression)
Chapter 14 class part 1
Class part2
Global and Chinese market of transfer case 2022-2028: Research Report on technology, participants, trends, market size and share
【Transformer】入门篇-哈佛Harvard NLP的原作者在2018年初以逐行实现的形式呈现了论文The Annotated Transformer
Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
Yolov5系列(一)——網絡可視化工具netron
Global and Chinese market of postal automation systems 2022-2028: Research Report on technology, participants, trends, market size and share
[engine development] rendering architecture and advanced graphics programming
QT - draw something else