当前位置:网站首页>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
边栏推荐
- Yolov5 advanced seven target tracking latest environment construction (II)
- The method of parameter estimation of user-defined function in MATLAB
- Global and Chinese market of trimethylamine 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
- 解决pushgateway数据多次推送会覆盖的问题
- Composite type (custom type)
- Basic SQL tutorial
- Can‘t connect to MySQL server on ‘localhost‘
- Leetcode sword offer find the number I (nine) in the sorted array
- 基于SVN分支开发模式流程浅析
猜你喜欢
![[ue4] cascading shadow CSM](/img/83/f4dfda3bd5ba0172676c450ba7693b.jpg)
[ue4] cascading shadow CSM

Redis主从、哨兵、集群模式介绍

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

The state does not change after the assignment of El switch

Open under vs2019 UI file QT designer flash back problem
![[set theory] inclusion exclusion principle (complex example)](/img/9a/db5a75e27516378c31531773a8a221.jpg)
[set theory] inclusion exclusion principle (complex example)

B2020 points candy

5-1 blocking / non blocking, synchronous / asynchronous

What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry

CentOS7部署哨兵Redis(带架构图,清晰易懂)
随机推荐
Kubernetes帶你從頭到尾捋一遍
Yolov5 series (I) -- network visualization tool netron
Matlab r2011b neural network toolbox precautions
Stress test WebService with JMeter
在MapReduce中利用MultipleOutputs输出多个文件
[graphics] adaptive shadow map
【日常训练】395. 至少有 K 个重复字符的最长子串
SQL server安装位置改不了
Tencent internship interview sorting
"Seven weapons" in the "treasure chest" of machine learning: Zhou Zhihua leads the publication of the new book "machine learning theory guide"
el-switch 赋值后状态不变化
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
Zero copy underlying analysis
. Net six design principles personal vernacular understanding, please correct if there is any error
[graphics] hair simulation in tressfx
5.2-5.3
Yolov5 advanced nine target tracking example 1
[ue4] material and shader permutation
[set theory] inclusion exclusion principle (complex example)
Relationship between truncated random distribution and original distribution