当前位置:网站首页>合理地配置线程池
合理地配置线程池
2022-06-12 19:11:00 【InfoQ】
合理地配置线程池
- 任务的性质:CPU密集型任务、IO密集型任务和混合型任务。
- 任务的优先级:高、中和低。
- 任务的执行时间:长、中和短。
- 任务的依赖性:是否依赖其他系统资源,如数据库连接。
线程池的监控
- taskCount:线程池需要执行的任务数量。
- completedTaskCount:线程池在运行过程中已完成的任务数量,小于或等于taskCount。
- largestPoolSize:线程池里曾经创建过的最大线程数量。通过这个数据可以知道线程池是否曾经满过。如该数值等于线程池的最大大小,则表示线程池曾经满过。
- getPoolSize:线程池的线程数量。如果线程池不销毁的话,线程池里的线程不会自动销毁,所以这个大小只增不减。
- getActiveCount:获取活动的线程数。
边栏推荐
- YOLOX网络结构详解
- Native servlet - upload & download of files
- review.js ppt数学公式无法显示
- Cookie & session & kaptcha verification code
- 232-ch579m learning and development Ethernet routine TCP server (project application package, LAN or WAN test)
- 3GPP RAN第一次F2F会议,都干了些啥?
- Kali LAN ARP Spoofing and monitoring other hosts' Internet access records in the LAN
- 观察网站的页面
- Redis中的事务
- Leetcode 1049. Weight of the last stone II
猜你喜欢

5G R17标准冻结,主要讲了些啥?

吃饭咯 干锅肥肠 + 掌中宝!

leetcode:5270. 网格中的最小路径代价【简单层次dp】

一种灵活注入 Istio Sidecar 的方案探索

ISCC2022

Dacom G150双模耳机,为爱发声,呵护孩子听力健康成长
![[SQL] MySQL query statement execution sequence analysis](/img/e0/6c55b798b5debfc780fb51498455ab.jpg)
[SQL] MySQL query statement execution sequence analysis

VC hacon joint programming genimage3extern writeimage

Liunx deploy Seata (Nacos version)

How to download proxystrike in China
随机推荐
Kali2022 how to install w3af
Shell 数组和函数
Cookie & session & kaptcha verification code
从应无所住说起
【观察】华为下一代数据中心,为广西低碳高质量发展“添动能”
China's asset management market demand and future competitive trends outlook report 2022-2028
Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of swimming fins in the global market in 2022
ISCC2022
Research Report on current market situation and investment prospect of China's tobacco RFID industry 2022-2027
RHCA回忆录---CL280介绍
A fruitful afternoon
美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战
How do I create my own appender in log4j- How to create my own Appender in log4j?
How to break the black screen after cleaning the dust and applying silicone grease on the laptop?
leetcode:6097. Match [set record + query one by one with the same length] after replacing characters
Leetcodesql: count the number of students in each major
Analysis report on market demand and investment strategy of China's re guarantee industry 2022-2028
no available service ‘null‘ found, please make sure registry config correct
DACOM G150 dual-mode earphones make sound for love and protect the healthy growth of children's hearing
Global and Chinese smart government industry market research and investment risk outlook report 2022-2028