Home Database Mysql Tutorial 内存参数设置不合理导致数据库HANG

内存参数设置不合理导致数据库HANG

Jun 07, 2016 pm 03:22 PM
unreasonable Memory parameter lead to database set up

内存参数设置不合理导致数据库HANG 现象: 2节点RAC,数据库忽然HANG住,重启一个实例后恢复正常。 分析: 故障时间段约为8:30-10:00,以下为alert报错: alert_crm2.log: Mon May 27 06:54:26 2013 SUCCESS:>Mon May 27 07:32:24 2013 Thread 2>ORA-07445:

内存参数设置不合理导致数据库HANG
现象:
2节点RAC,数据库忽然HANG住,重启一个实例后恢复正常。

分析:
故障时间段约为8:30-10:00,以下为alert报错:
alert_crm2.log:

Mon May 27 06:54:26 2013
SUCCESS:> Mon May 27 07:32:24 2013
Thread 2> ORA-07445: 出现异常错误: 核心转储 [kksMapCursor()+323] [SIGSEGV] [ADDR:0x8] [PC:0x763597B] [Address not mapped to object] []
ORA-03135: 连接失去联系
Mon May 27 09:54:56 2013
Errors> ORA-07445: 出现异常错误: 核心转储 [kksMapCursor()+323] [SIGSEGV] [ADDR:0x8] [PC:0x763597B] [Address not mapped to object] []
ORA-03135: 连接失去联系
Mon May 27 09:54:56 2013
Errors> ORA-07445: 出现异常错误: 核心转储 [kksMapCursor()+323] [SIGSEGV] [ADDR:0x8] [PC:0x763597B] [Address not mapped to object] []
ORA-03135: 连接失去联系
Mon May 27 09:54:56 2013
Errors> ORA-07445: 出现异常错误: 核心转储 [kksMapCursor()+323] [SIGSEGV] [ADDR:0x8] [PC:0x763597B] [Address not mapped to object] []
ORA-03135: 连接失去联系
Incident> USER (ospid: 15258): terminating the instance
Mon May 27 09:55:05 2013
ORA-1092 :> ORA-00600: internal error code, arguments: [723], [109464], [127072], [memory leak], [], [], [], [] Incident> loadavg : 69.72 40.04 27.44
memory> swap info: free = 0.00M alloc = 0.00M total = 0.00M
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
0 S> #0 0x0000003e2d6d50e7 in semop () from /lib64/libc.so.6
#1 0x000000000778a4f6> #7 0x0000000003b87b4a in kjdrchkdrm ()
#8 0x0000000003a38c5a>
Snap Id Snap Time Sessions Curs/Sess
--------- ------------------- -------- ---------
Begin Snap: 6261 27-May-13 09:00:40 404 7.5
End Snap: 6262 27-May-13 10:00:34 488 5.3
Elapsed: 59.90 (mins)
DB Time: 10,417.13 (mins)

Top 5 Timed Foreground Events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg
wait % DB
Event Waits Time(s) (ms)> gc current block 2-way 411,847 673 2 3.8 Cluster
gc>
*** 2013-05-27 07:26:41.101
Trace> (session) sid: 1645 ser: 1 trans: (nil), creator: 0x590fc76e0
flags: (0x51) USR/-> Dumping Session Wait History:
0:> wait_id=348204630 seq_num=17176 snap_id=1
wait> wait times (usecs) - max=infinite
wait> occurred after 228 microseconds of elapsed time
1:>




CRMM01_130527_0800.nmon.xlsx:

CPU Total CRMM01 User% Sys% Wait% Idle% CPU% CPUs

9:38:00 2.4 0.8 6.2 90.7 3.2 24
9:39:31 1.3 1 5.9 91.9 2.3 24
9:41:01 16 5 7.6 71.4 21 24
9:42:33 91.3 7.9 0.2 0.6 99.2 24 Time PID %CPU %Usr %Sys Size ResSet ResText ResData ShdLib MinorFault MajorFault Command
8:07:34 773 0.76 0 0.76 0 0 0 0 0 0 0> 8:07:34 774 36.91 0 36.91 0 0 0 0 0 0 0 kswapd1 1.54 0

Memory MB CRMM01>
Paging> Node1: swap increased after 8:00.

CRMM01_130527_0800.nmon.xlsx:
Paging> 8:03:03 589 10.81 kswapd0
8:06:03 589 1.68>
通过以上的日志分析,大致发现客户的DB在故障时间段存在一些问题:
1.内存资源紧张(a.lmd0在进行一些内存释放的操作;b.free> 2.空闲SWAP页面紧张,大量的page in/out 3.严重的shared> 4.实例1的lmd0在9:42-9:44HANG住(STALL),
还未完全理清的时候,客户的DB又出现了HANG住的情况,这次客户做了systemstate> HANG ANALYSIS:
instances (db_name.oracle_sid):>
Chains> Chain 1 Signature Hash: 0xb52ba8a9
[b] Chain 2 Signature: 'latch:> Chain 2 Signature Hash: 0x985d217a
[c] Chain 3 Signature: 'latch:> Chain 3 Signature Hash: 0xb52ba8a9

Chain 1:
-------------------------------------------------------------------------------
Oracle> p2: 'number'=0x101
p3: 'tries'=0x0
time> short stack: wait> time waited: 4.944027 secs p2: 'number'=0x101
p3: 'tries'=0x0
2.> time waited: 0.104395 secs p2: 'number'=0x101
p3: 'tries'=0x0
3.> time waited: 0.079024 secs p2: 'number'=0x101
p3: 'tries'=0x0
}
and> {
instance: 1 (crm.crm1)
os> p2: 'number'=0x115
p3: 'tries'=0x0
time> current sql:
short> time waited: 5.627769 secs p2: 'number'=0x101
p3: 'tries'=0x0
2.> time waited: 0.465190 secs p2: 'number'=0x101
p3: 'tries'=0x0
3.> time waited: 0.082002 secs p2: 'number'=0x101
p3: 'tries'=0x0
}
从DUMP信息看来,这次的情况跟上次类似,大量的latch: shared pool等待。
客户的DB配置情况:
物理内存24G,而MEMORY_TARGET设置为22G,感觉配置的非常不合理,客户的情况跟我之前处理过的一个CASE很像(ORA-609:疑似MEMORY_TARGET设置过大导致的宕机http://blog.csdn.net/zhou1862324/article/details/17288103),都是MEMORY_TARGET参数设置过大导致出现SWAP PAGE IN/OUT的情况,最终导致数据库HANG住或宕机。
之前的CASE发生在另一位客户的一套非常重要的生产库上,数据库屡次宕机客户苦不堪言,而客户接收了我的建议将MEMORY_TARGET调低到一个合理的值之后,类似的问题没有再发生了。
所以,对于这个案例,我给了客户2个建议:
1.减少 memory_target 和 memory_max_target,预留更多内存供OS使用,减少发生SWAP PAGE IN/OUT的可能性。
2.启用hugepages,hugepages本身就是锁定在内存中不能被SWAP的,但Hugepages与memory_target不兼容,所以需要禁用memory_target,设置sga_target和pga_aggregate_target。
关于HUGEPAGE,可以参考我转的一篇文章HugePages on Oracle Linux 64-bit(http://blog.csdn.net/zhou1862324/article/details/17540277)。

解决方法:
最终客户选择了调小memory_target 和 memory_max_target,问题未再出现。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Large memory optimization, what should I do if the computer upgrades to 16g/32g memory speed and there is no change? Large memory optimization, what should I do if the computer upgrades to 16g/32g memory speed and there is no change? Jun 18, 2024 pm 06:51 PM

For mechanical hard drives or SATA solid-state drives, you will feel the increase in software running speed. If it is an NVME hard drive, you may not feel it. 1. Import the registry into the desktop and create a new text document, copy and paste the following content, save it as 1.reg, then right-click to merge and restart the computer. WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement]"DisablePagingExecutive"=d

Sources say Samsung Electronics and SK Hynix will commercialize stacked mobile memory after 2026 Sources say Samsung Electronics and SK Hynix will commercialize stacked mobile memory after 2026 Sep 03, 2024 pm 02:15 PM

According to news from this website on September 3, Korean media etnews reported yesterday (local time) that Samsung Electronics and SK Hynix’s “HBM-like” stacked structure mobile memory products will be commercialized after 2026. Sources said that the two Korean memory giants regard stacked mobile memory as an important source of future revenue and plan to expand "HBM-like memory" to smartphones, tablets and laptops to provide power for end-side AI. According to previous reports on this site, Samsung Electronics’ product is called LPWide I/O memory, and SK Hynix calls this technology VFO. The two companies have used roughly the same technical route, which is to combine fan-out packaging and vertical channels. Samsung Electronics’ LPWide I/O memory has a bit width of 512

Kingbang launches new DDR5 8600 memory, offering CAMM2, LPCAMM2 and regular models to choose from Kingbang launches new DDR5 8600 memory, offering CAMM2, LPCAMM2 and regular models to choose from Jun 08, 2024 pm 01:35 PM

According to news from this site on June 7, GEIL launched its latest DDR5 solution at the 2024 Taipei International Computer Show, and provided SO-DIMM, CUDIMM, CSODIMM, CAMM2 and LPCAMM2 versions to choose from. ▲Picture source: Wccftech As shown in the picture, the CAMM2/LPCAMM2 memory exhibited by Jinbang adopts a very compact design, can provide a maximum capacity of 128GB, and a speed of up to 8533MT/s. Some of these products can even be stable on the AMDAM5 platform Overclocked to 9000MT/s without any auxiliary cooling. According to reports, Jinbang’s 2024 Polaris RGBDDR5 series memory can provide up to 8400

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

DDR5 MRDIMM and LPDDR6 CAMM memory specifications are ready for launch, JEDEC releases key technical details DDR5 MRDIMM and LPDDR6 CAMM memory specifications are ready for launch, JEDEC releases key technical details Jul 23, 2024 pm 02:25 PM

According to news from this website on July 23, the JEDEC Solid State Technology Association, the microelectronics standard setter, announced on the 22nd local time that the DDR5MRDIMM and LPDDR6CAMM memory technical specifications will be officially launched soon, and introduced the key details of these two memories. The "MR" in DDR5MRDIMM stands for MultiplexedRank, which means that the memory supports two or more Ranks and can combine and transmit multiple data signals on a single channel without additional physical The connection can effectively increase the bandwidth. JEDEC has planned multiple generations of DDR5MRDIMM memory, with the goal of eventually increasing its bandwidth to 12.8Gbps, compared with the current 6.4Gbps of DDR5RDIMM memory.

Lexar God of War Wings ARES RGB DDR5 8000 Memory Picture Gallery: Colorful White Wings supports RGB Lexar God of War Wings ARES RGB DDR5 8000 Memory Picture Gallery: Colorful White Wings supports RGB Jun 25, 2024 pm 01:51 PM

When the prices of ultra-high-frequency flagship memories such as 7600MT/s and 8000MT/s are generally high, Lexar has taken action. They have launched a new memory series called Ares Wings ARES RGB DDR5, with 7600 C36 and 8000 C38 is available in two specifications. The 16GB*2 sets are priced at 1,299 yuan and 1,499 yuan respectively, which is very cost-effective. This site has obtained the 8000 C38 version of Wings of War, and will bring you its unboxing pictures. The packaging of Lexar Wings ARES RGB DDR5 memory is well designed, using eye-catching black and red color schemes with colorful printing. There is an exclusive &quo in the upper left corner of the packaging.

Longsys displays FORESEE LPCAMM2 notebook memory: up to 64GB, 7500MT/s Longsys displays FORESEE LPCAMM2 notebook memory: up to 64GB, 7500MT/s Jun 05, 2024 pm 02:22 PM

According to news from this website on May 16, Longsys, the parent company of the Lexar brand, announced that it will demonstrate a new form of memory - FORESEELPCAMM2 at CFMS2024. FORESEELPCAMM2 is equipped with LPDDR5/5x particles, is compatible with 315ball and 496ball designs, supports frequencies of 7500MT/s and above, and has product capacity options of 16GB, 32GB, and 64GB. In terms of product technology, FORESEELPCAMM2 adopts a new design architecture to directly package 4 x32LPDDR5/5x memory particles on the compression connector, realizing a 128-bit memory bus on a single memory module, providing a more efficient packaging than standard memory modules.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

See all articles