当前位置:网站首页>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
边栏推荐
- Global and Chinese market of lighting control components 2022-2028: Research Report on technology, participants, trends, market size and share
- CentOS7部署哨兵Redis(带架构图,清晰易懂)
- 2022/02/14
- Using notepad++ to build an arbitrary language development environment
- Apache ant extension tutorial
- 什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
- Global and Chinese markets for transparent OLED displays 2022-2028: Research Report on technology, participants, trends, market size and share
- 【微信小程序】WXSS 模板样式
- Redis主从、哨兵、集群模式介绍
- Search in the two-dimensional array of leetcode sword offer (10)
猜你喜欢
![[graphics] adaptive shadow map](/img/93/a6a3c7716331368c90c2c86da11f55.jpg)
[graphics] adaptive shadow map

There are links in the linked list. Can you walk three steps faster or slower
![[graphics] hair simulation in tressfx](/img/41/cef55811463d3a25a29ddab5278af0.jpg)
[graphics] hair simulation in tressfx

High quality workplace human beings must use software to recommend, and you certainly don't know the last one

What is machine reading comprehension? What are the applications? Finally someone made it clear

Didi off the shelf! Data security is national security

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

mysql innodb 存储引擎的特性—行锁剖析

Kubernetes帶你從頭到尾捋一遍

Open under vs2019 UI file QT designer flash back problem
随机推荐
开启 Chrome 和 Edge 浏览器多线程下载
Global and Chinese markets for transparent OLED displays 2022-2028: Research Report on technology, participants, trends, market size and share
视觉上位系统设计开发(halcon-winform)-6.节点与宫格
Nppexec get process return code
What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding
[graphics] real shading in Unreal Engine 4
Kubernetes - YAML文件解读
.NET六大设计原则个人白话理解,有误请大神指正
Global and Chinese market of iron free motors 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
Detailed comments on MapReduce instance code on the official website
[transform] [practice] use pytoch's torch nn. Multiheadattention to realize self attention
QT - draw something else
零拷贝底层剖析
官网MapReduce实例代码详细批注
解决pushgateway数据多次推送会覆盖的问题
视觉上位系统设计开发(halcon-winform)-2.全局变量设计
redis缓存穿透,缓存击穿,缓存雪崩解决方案
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
Tencent internship interview sorting