当前位置:网站首页>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
边栏推荐
- mysql innodb 存储引擎的特性—行锁剖析
- Influxdb2 sources add data sources
- What is label encoding? How to distinguish and use one hot encoding and label encoding?
- Devaxpress: range selection control rangecontrol uses
- B2020 points candy
- 视觉上位系统设计开发(halcon-winform)-3.图像控件
- [opengl] advanced chapter of texture - principle of flowmap
- [set theory] inclusion exclusion principle (complex example)
- Yolov5 advanced nine target tracking example 1
- There are links in the linked list. Can you walk three steps faster or slower
猜你喜欢
【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer
Troubleshooting method of CPU surge
el-switch 赋值后状态不变化
Didi off the shelf! Data security is national security
The state does not change after the assignment of El switch
Halcon与Winform学习第二节
北京共有产权房出租新规实施的租赁案例
第04章_逻辑架构
Byte practice surface longitude
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
随机推荐
Puppet自动化运维排错案例
el-switch 赋值后状态不变化
什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
Kubernetes帶你從頭到尾捋一遍
Halcon与Winform学习第二节
App全局异常捕获
Besides lying flat, what else can a 27 year old do in life?
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
链表有环,快慢指针走3步可以吗
高并发下之redis锁优化实战
[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
Detailed comments on MapReduce instance code on the official website
What is machine reading comprehension? What are the applications? Finally someone made it clear
Using notepad++ to build an arbitrary language development environment
Class part2
Global and Chinese markets for infrared solutions (for industrial, civil, national defense and security applications) 2022-2028: Research Report on technology, participants, trends, market size and sh
TPS61170QDRVRQ1
Influxdb2 sources add data sources
Yolov5 series (I) -- network visualization tool netron
什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?