当前位置:网站首页>IO intensive and CPU intensive
IO intensive and CPU intensive
2022-06-22 06:18:00 【Kuxiaoya】
One 、 Computationally intensive
Very much CPU Computing resources , Let each CPU The core is involved in the calculation ,CPU Take full advantage of performance , Avoid excessive thread context switching , The ideal solution is : Number of threads = CPU Check the number +1
Can also be CPU Check the number *2, Want to see JDK edition , And CPU To configure ( The server CPU Have hyper-threading ).1.8 To increase parallel computing , Want to Number of threads = CPU Number of kernel threads *2
Two 、IO intensive
The Internet 、 disk IO ( And DB、 cache ), once IO, The thread waits , Do not execute until the end . Set the number of threads , Do something else while waiting , Increase of efficiency .
Thread context switching comes at a cost .IO Dense formula : Number of threads = CPU The core number /(1- Block coefficient ) The blocking coefficient is general 0.8~0.9, Dual core CPU Ideal number of threads 20, The dynamic thread pool looks at the pressure measurement .
3、 ... and 、1000 Concurrent threads ,10 Taiwan machine , Each machine 4 nucleus , Design thread pool size
Ideas :CPU、IO Intensive situations . Reasonable parameter configuration through pressure measurement . Thread pool dynamic adjustment .
CPU Concentrated : Reduce context switching , Number of core threads 5, Queue leader 100, The maximum number of threads is consistent with the number of core threads .
IO Concentrated : Allocate a small number of core threads , Better use CPU, Number of core threads 8, Queue leader 100, Maximum thread pool 10
It's all theoretical values . Number of threads from the core 5 Start the pressure test , Comparing the results , Determine the appropriate settings . limit : The number of core threads and the maximum number of threads are 4, queue 96, just 100 request
边栏推荐
- C#中的数组及Foreach遍历
- Shengxin visualization (Part3) -- violin diagram
- Callable
- Empirical mode decomposition (EMD) and Hilbert Huang transform (HHT)
- BlockingQueue四组API
- Common auxiliary classes - (key)
- Vertical maximum and minimum and horizontal maximum and minimum greatest(), least(), max(), min()
- ERROR: cannot verify nih.at’s certificate, issued by “/C=US/O=Let‘s Encrypt/CN=R3”,wget报错
- [technical notes]
- linux 链接sqlserver,离线安装
猜你喜欢

用蒙特卡洛法求圆周率pi

SQL 注入漏洞(十三)base64注入

单细胞论文记录(part11)--ClusterMap for multi-scale clustering analysis of spatial gene expression

GeoSwath plus 技术和数据采集处理

Little bear school bearpi HM micro officially integrated into openharmony trunk

Expert system clips from introduction to mastery (I) introduction and overview of clips

SQL 注入漏洞(十)二次注入

h = key.hashCode()) ^ (h >>> 16) 详细解读以及为什么要将hashCode值右移16位并且与原来的hashCode值进行异或操作

Pyg tutorial (7): dissecting neighborhood aggregation

【CPU设计实战】数字逻辑电路设计基础(一)
随机推荐
[Examen des points clés de l'informatique en nuage]
Machine learning concept sorting (no formula)
类加载内存分析
MYSQL牛客刷题
Common auxiliary classes - (key)
CMake 入门级别语法
On the matrix order of MNIST linear model
StopWatch的使用
Callable
CGIC文件上传----菜鸟笔记
postgresql数据库中根据某个字段判断存在则更新(update)操作,不存在则插入(insert)
集合类并发不安全问题
Shengxin visualization (Part1) -- histogram
Configuration files required for SSM integration and error reports caused by common configuration errors
单细胞论文记录(part13)--SpaGCN: Integrating gene expression, spatial location and histology to ...
Little bear school bearpi HM micro officially integrated into openharmony trunk
SQL 注入漏洞(十二)Cookie注入
基于卫星测深的牙买加沿岸水深测量
[Key review of cloud computing]
【NAND文件系统】UBIFS介绍