处理LOB(大对象)表enqueue HW问题的一个方法
database August 4th, 2010在RDBMS系统中,发生enqueue等待特别是enqueue TX-contention是再正常不过的了,原因很简单,为了满足ACID原则。但如果是enqueue HW-contention,你遇到的机会就要稍微少一些了,因为这一般只发生在大量数据装载或者是OLTP业务非常繁忙的系统中。
这不,我们的一个银行用好,恰巧就发生了这么一个问题,当大批量数据装载时,系统CPU使用率接近100%(这可是128CPU的HP superdome),而这其中的90%以上,是在等待enqueue HW 。当然,这个系统的架构有其特殊性,每个表只有两个字段,一个number,一个LOB(这个时候,你可能就会发现架构师对性能的影响有多么巨大了)。
HW=HighWatermark,所谓的高水位竞争。就是当数据插入的session过多,对最后一个可用块的竞争,以得到下一个空闲块(或者extent)。
这种情况,如果是普通表,使用alter table <TABNAME> allocate extent 提前多分配extent即可解决。
但是含有LOB(clob)字段的表,据客户反应,用这个方法在loading装载开始后的2分钟之内是有效的,但之后就不灵了,原因和在? 原因处在lob方式。
解决方式分两种,在ASSM表空间之内的:
a) As temporary workaround, manually add extra space to the LOB segment
ALTER TABLE <lob_table>
MODIFY LOB (<column_name>) (allocate extent (size <extent size>));
OR
b) It may related Bug 6376915.
Refer to Note 6376915.8 “Bug 6376915 HW enqueue contention for ASSM LOB segments”
In 10.2.0.4 or above, this fix has been included, and can be enabled by setting event 44951 to a value
between 1 and 1024. A higher value would be more beneficial in reducing contention.
EVENT=”44951 TRACE NAME CONTEXT FOREVER, LEVEL < 1 – 1024 >”
OR
c) Consider partitioning the LOB in a manner that will evenly distribute concurrent DML across multiple
partitions
使用MSSM的:
a) As temporary workaround, manually add extra space to the LOB segment
ALTER TABLE <lob_table>
MODIFY LOB (<column_name>) (allocate extent (size <extent size>));
OR
b) Consider partitioning the LOB in a manner that will evenly distribute concurrent DML across multiple
partitions
如我先去提到的,由于表的字段只有两个,lob字段中包含的内容实在太复杂,所以partition方式无法处理这个问题。只能是每次装载前,使用批处理的方式,预先分配200G左右的lob extent。

August 5th, 2010 at 01:35
为啥”每个表只有两个字段,一个number,一个LOB”. 这个属于关系数据库模型的哪门子范式? 鄙人整个晕倒了.
August 5th, 2010 at 11:37
呵呵,这个核心应用是这个公司开发的玩意: http://www.temenos.com/en/T24/
不是晕倒啊
August 6th, 2010 at 01:37
“不是晕倒啊”,拼死挺着.
December 7th, 2011 at 06:15
Hello Webmaster, I noticed that http://www.zhihong.org/handle_enqueue_hw_wait_with_lo.html is ranking pretty low on Google and has a low Google PageRank. Now the Google PageRank is how Google is able to see how relevant your webpage is compared to all the other webpages online, if you cannot rank high at the top of Google, then you will NOT get the traffic you need. Now usually trying to get to the top of Google costs hundreds if not thousands of dollars and very highly optimized targeted marketing campaigns that takes a team of experts months to achieve. However, we can show you how to get to the top of Google with no out of pocket expenses (free traffic), no stupid ninja tricks, no silly mind control techniques, and this will be all white hat with no blackhat software or tactics that could possibly land you on bad terms with Google and put you in the dreaded “Google Sandbox”. We’ll show you how to easily capture all the targeted traffic you need, for free, multiple ways to land fast (not months) first-page rankings in Google and other major search engines (Bing, Yahoo, Ask, etc), even show you strategies on how to earn daily commissions just try Ranking Top of Google, please check out our 5 minute video.
[WORDPRESS HASHCASH] The poster sent us ’244249192 which is not a hashcash value.
December 20th, 2011 at 20:05
Hello Webmaster, I noticed that http://www.zhihong.org/handle_enqueue_hw_wait_with_lo.html is ranking pretty low on Google and has a low Google PageRank. Now the Google PageRank is how Google is able to see how relevant your webpage is compared to all the other webpages online, if you cannot rank high at the top of Google, then you will NOT get the traffic you need. Now usually trying to get to the top of Google costs hundreds if not thousands of dollars and very highly optimized targeted marketing campaigns that takes a team of experts months to achieve. However, we can show you how to get to the top of Google with no out of pocket expenses (free traffic), no stupid ninja tricks, no silly mind control techniques, and this will be all white hat with no blackhat software or tactics that could possibly land you on bad terms with Google and put you in the dreaded “Google Sandbox”. We’ll show you how to easily capture all the targeted traffic you need, for free, multiple ways to land fast (not months) first-page rankings in Google and other major search engines (Bing, Yahoo, Ask, etc), even show you strategies on how to earn daily commissions just try Ranking Top of Google, please check out our 5 minute video.