当前位置:网站首页>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带你从头到尾捋一遍
- [graphics] adaptive shadow map
- Redis主从、哨兵、集群模式介绍
- Kubernetes帶你從頭到尾捋一遍
- C string format (decimal point retention / decimal conversion, etc.)
- Composite type (custom type)
- [Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
- . Net six design principles personal vernacular understanding, please correct if there is any error
- Basic SQL tutorial
- 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

Yolov5 series (I) -- network visualization tool netron

Kubernetes 进阶训练营 Pod基础

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

Pytoch deep learning and target detection practice notes

What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry
![[ue4] cascading shadow CSM](/img/83/f4dfda3bd5ba0172676c450ba7693b.jpg)
[ue4] cascading shadow CSM

链表有环,快慢指针走3步可以吗

What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding
![[pytorch learning notes] datasets and dataloaders](/img/c0/9cd539caff34db3cccc44505bbe3c5.png)
[pytorch learning notes] datasets and dataloaders
随机推荐
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
[pytorch learning notes] datasets and dataloaders
Solve the problem that pushgateway data will be overwritten by multiple push
TPS61170QDRVRQ1
【日常训练】395. 至少有 K 个重复字符的最长子串
Apache ant extension tutorial
【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
App global exception capture
[engine development] in depth GPU and rendering optimization (basic)
406. Reconstruct the queue according to height
视觉上位系统设计开发(halcon-winform)-3.图像控件
Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
Relationship between truncated random distribution and original distribution
Yolov5进阶之七目标追踪最新环境搭建(二)
Global and Chinese markets of AC electromechanical relays 2022-2028: Research Report on technology, participants, trends, market size and share
【可能是全中文网最全】pushgateway入门笔记
【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention
视觉上位系统设计开发(halcon-winform)-4.通信管理
Basic SQL tutorial
Besides lying flat, what else can a 27 year old do in life?