未同步hashMap于并发环境cpu巨高

本文介绍了一个关于LRUMap作为缓存在高并发环境下引发系统挂起的问题。由于LRUMap继承自非线程安全的HashMap,在高并发下会导致系统线程挂起及CPU使用率异常增高。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 系统中 一小疏漏,使用 LRUMap作缓存,其继承至abstractHashMap, 因hashmap isn't thead-safe.

并发量大时, 导致客户一系统全部hung住. 只能重启. 

后查was也发生过类似问题. 

  WebSphere Portal 6.1 and 7 is running on WebSphere Application Server 7 which is based on Java 6. The Java 6 HashMap which is not thread-safe is less tolerant to concurrent access under load. This causes the threads accessing the HashMap concurrently to hang and the WebSphere Portal process to incur a higher than normal CPU usage. In Many Cases the hung threads can lead to near 100% CPU usage by the WebSphere Portal process.

 

http://www-01.ibm.com/support/docview.wss?uid=swg21427374

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值