当前位置:网站首页>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
边栏推荐
- QT program font becomes larger on computers with different resolutions, overflowing controls
- Remote server background hangs nohup
- Idea does not specify an output path for the module
- 4-29——4.32
- Several sentences extracted from the book "leather bag"
- 视觉上位系统设计开发(halcon-winform)-5.相机
- 【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer
- socket.io搭建分布式Web推送服务器
- Nppexec get process return code
- Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

【可能是全中文网最全】pushgateway入门笔记

What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding

Pytorch深度学习和目标检测实战笔记
![[engine development] in depth GPU and rendering optimization (basic)](/img/71/abf09941eb06cd91784df50891fe29.jpg)
[engine development] in depth GPU and rendering optimization (basic)

Yolov5系列(一)——网络可视化工具netron

What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding

C # realizes the login interface, and the password asterisk is displayed (hide the input password)

Dataframe returns the whole row according to the value
![[wechat applet] wxss template style](/img/28/f9d12bf761e25f9564d92697cf049d.png)
[wechat applet] wxss template style

C string format (decimal point retention / decimal conversion, etc.)
随机推荐
el-switch 赋值后状态不变化
406. Reconstruct the queue according to height
App global exception capture
Remote server background hangs nohup
[transform] [NLP] first proposed transformer. The 2017 paper "attention is all you need" by Google brain team
Neon global and Chinese markets 2022-2028: Research Report on technology, participants, trends, market size and share
Several sentences extracted from the book "leather bag"
Redis主从、哨兵、集群模式介绍
What is machine reading comprehension? What are the applications? Finally someone made it clear
Stress test WebService with JMeter
Mmdetection learning rate and batch_ Size relationship
Halcon与Winform学习第二节
TPS61170QDRVRQ1
[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
ASTC texture compression (adaptive scalable texture compression)
Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
使用JMeter对WebService进行压力测试
[ue4] cascading shadow CSM
4-24--4-28
Matplotlib drawing label cannot display Chinese problems