当前位置:网站首页>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
边栏推荐
- XWiki安装使用技巧
- Kubernetes帶你從頭到尾捋一遍
- Using notepad++ to build an arbitrary language development environment
- What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry
- 什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
- TPS61170QDRVRQ1
- Unity hierarchical bounding box AABB tree
- Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)
- [graphics] hair simulation in tressfx
- 4-24--4-28
猜你喜欢

Chapter 04_ Logical architecture
![[pytorch learning notes] datasets and dataloaders](/img/c0/9cd539caff34db3cccc44505bbe3c5.png)
[pytorch learning notes] datasets and dataloaders

4-24--4-28
![[ue4] HISM large scale vegetation rendering solution](/img/a2/2ff2462207e3c3e8364a092765040c.jpg)
[ue4] HISM large scale vegetation rendering solution

【微信小程序】WXSS 模板样式

B2020 points candy
![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“)
![[ue4] material and shader permutation](/img/8f/7743ac378490fcd7b9ecc5b4c2ef2a.jpg)
[ue4] material and shader permutation

【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器

运维体系的构建
随机推荐
【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention
Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
Global and Chinese market of air cargo logistics 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)
What is label encoding? How to distinguish and use one hot encoding and label encoding?
什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
【微信小程序】WXSS 模板样式
Yolov5 series (I) -- network visualization tool netron
406. 根据身高重建队列
Finally, someone explained the financial risk management clearly
视觉上位系统设计开发(halcon-winform)-4.通信管理
[pytorch learning notes] transforms
第04章_逻辑架构
Global and Chinese markets for sterile packaging 2022-2028: Research Report on technology, participants, trends, market size and share
Kubernetes - YAML文件解读
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
MySQL reports an error: [error] mysqld: file '/ mysql-bin. 010228‘ not found (Errcode: 2 “No such file or directory“)
Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
[probably the most complete in Chinese] pushgateway entry notes
Apache ant extension tutorial