Home Database Mysql Tutorial 用ipcs管理oracleunix共享内存

用ipcs管理oracleunix共享内存

Jun 07, 2016 pm 04:03 PM
unix shared Memory manage

UNIX and Linux Shared Memory and Oracle The UNIX and LINUX operating systems allocate memory based on an interprocess communication model (IPC) to manage memory segments for Oracle database environments. To obtain details on shared memory f

UNIX and Linux Shared Memory and Oracle

The UNIX and LINUX operating systems allocate memory based on an interprocess communication model (IPC) to manage memory segments for Oracle database environments.

To obtain details on shared memory for UNIX and LINUX, make use of the ipcs command. Details on syntax are illustrated below from within the UNIX and LINUX man pages:

NAME

ipcs : provide information on ipc facilities

SYNOPSIS

ipcs [ -asmq ] [ -tclup ]

ipcs [ -smq ] -i id

ipcs -h

DESCRIPTION

ipcs provides information on the ipc facilities for which the calling process has read access

The -i option allows a specific resource ID to be specified. Only information on this id will be printed.

Resources may be specified as follows:

-m shared memory segments

-q message queues

Determine what Oracle database has a semaphore set

As we have noted, when an Oracle database hangs, you may have leftover background processes, held RAM memory segment and held semaphore sets. When you have multiple instances on a UNIX server and need to release a semaphore set for an Oracle database, you must first determine which semaphore set belongs to your crippled instance.

Unfortunately, you cannot tell with the ipcs ?sa command which semaphore set belongs to each Oracle database. Here is the Oracle procedure for determining the semaphore set number for an individual Oracle database so that you can remove the semaphores with the ipcs command.

SQL> oradebug setmypid

SQL> oradebug ipc

SQL> !vi /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_13358.trc

*** 2014-09-20 17:35:30.830
Processing Oradebug command 'ipc'
Dump of unix-generic skgm context
areaflags 000000f7
realmflags 0000000f
mapsize 00000800
protectsize 00001000
lcmsize 00001000
seglen 00400000
largestsize 000000007ead3000
smallestsize 0000000000400000
stacklimit 0xbda06894
stackdir -1
mode 660
magic acc01ade
Handle: 0x1b0058 `/u01/app/oracle/product/11.2.0/db_1orcl'
Dump of unix-generic realm handle `/u01/app/oracle/product/11.2.0/db_1orcl', flags = 00000000
Area #0 `Fixed Size' containing Subareas 0-0
Total size 00000000001476d4 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
0 0 3080200 0x00000020000000 0x00000020000000
Subarea size Segment size
0000000000148000 000000003ec00000
Area #1 `Variable Size' containing Subareas 4-4
Total size 000000003e000000 Minimum Subarea size 00400000
Area Subarea Shmid Stable Addr Actual Addr
1 4 3080200 0x00000020800000 0x00000020800000
Subarea size Segment size
000000003e000000 000000003ec00000
Area #2 `Redo Buffers' containing Subareas 1-1
Total size 000000000047a000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
2 1 3080200 0x00000020148000 0x00000020148000
Subarea size Segment size
000000000047a000 000000003ec00000
Area #3 `Base Allocator Control' containing Subareas 3-3
Total size 0000000000002000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
3 3 3080200 0x000000207fe000 0x000000207fe000
Subarea size Segment size
0000000000002000 000000003ec00000
Area #4 `Slab Allocator Control' containing Subareas 2-2
Total size 000000000023c000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
4 2 3080200 0x000000205c2000 0x000000205c2000
Subarea size Segment size
000000000023c000 000000003ec00000
Area #5 `skgm overhead' containing Subareas 5-5
Total size 0000000000003000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
5 5 3080200 0x0000005e800000 0x0000005e800000
Subarea size Segment size
0000000000003000 000000003ec00000
Dump of Linux-specific skgm context
sharedmmu 00000001
shareddec 0
used region 0: start 0000000012000000 length 0000000000400000
used region 1: start 0000000020000000 length 000000003ec00000
used region 2: start 00000000af800000 length 0000000010800000
Maximum processes: = 150
Number of semaphores per set: = 154
Semaphores key overhead per set: = 4
User Semaphores per set: = 150
Number of semaphore sets: = 1
Semaphore identifiers: = 1
Semaphore List=
131073
-------------- system semaphore information -------------
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 2883587 root 644 52 2
0x00000000 2916357 root 644 16384 2
0x00000000 2949126 root 644 268 2
0xd3ac6c80 3080200 oracle 660 4096 0
------ Semaphore Arrays --------
key semid owner perms nsems
0x5c23a1bc 131073 oracle 660 154
------ Message Queues --------
key msqid owner perms used-bytes messages

Since we cannot get the semaphore set number for the crippled database, we must determine the semaphore set using the process of elimination. We issues the above commands for each live database on the server, and the un-claimed semaphore set will belong to the crippled instance.

Once identified, you can use the following procedure for removing the semaphore set.

Removing a semaphore set for Oracle

We start by issuing the ipcs ?sb command to display details of the semaphore set.

root> ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x7403d635 1769472 root 600 4 0
0x00000001 1933313 root 600 655360 2
0x7403d60a 2523138 root 600 4 0
0x00000000 2883587 root 644 52 2
0x7403d609 2490372 root 600 4 0
0x00000000 2916357 root 644 16384 2
0x00000000 2949126 root 644 268 2
0x00000000 3014663 gdm 600 393216 2 dest
0xd3ac6c80 3080200 oracle 660 4096 0


------ Semaphore Arrays --------
key semid owner perms nsems
0x000000a7 0 root 600 1
0x5c23a1bc 131073 oracle 660 154


Now, we can remove the semaphores from the locked-up database. In this example, we assume that set 131073is the one for the crippled database.

root> ipcrm -s 131073

Now we can confirm that the semaphores are deleted.


root> ipcs -sb|grep oracle


s 67 0x00000000 --ra-r----- oracle dba 400
s 334 0x00000000 --ra-r----- oracle dba 300
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

How to check memory usage on Xiaomi Mi 14Pro? How to check memory usage on Xiaomi Mi 14Pro? Mar 18, 2024 pm 02:19 PM

Recently, Xiaomi released a powerful high-end smartphone Xiaomi 14Pro, which not only has a stylish design, but also has internal and external black technology. The phone has top performance and excellent multitasking capabilities, allowing users to enjoy a fast and smooth mobile phone experience. However, performance will also be affected by memory. Many users want to know how to check the memory usage of Xiaomi 14Pro, so let’s take a look. How to check memory usage on Xiaomi Mi 14Pro? Introduction to how to check the memory usage of Xiaomi 14Pro. Open the [Application Management] button in [Settings] of Xiaomi 14Pro phone. To view the list of all installed apps, browse the list and find the app you want to view, click on it to enter the app details page. In the application details page

How to share wallpaperengine with friends How to share wallpaperengine with friends Mar 18, 2024 pm 10:00 PM

Users can share the wallpapers they obtain with friends when using WallpaperEngine. Many users do not know how to share WallpaperEngine with friends. They can save their favorite wallpapers locally and then share them with friends through social software. How to share wallpaperengine with friends Answer: Save it locally and share it with friends. 1. It is recommended that you save your favorite wallpapers locally and then share them with friends through social software. 2. You can also upload it to the computer through a folder, and then click Share using the creative workshop function on the computer. 3. Use Wallpaperengine on the computer, open the options bar of the creative workshop and find

Is there a big difference between 8g and 16g memory in computers? (Choose 8g or 16g of computer memory) Is there a big difference between 8g and 16g memory in computers? (Choose 8g or 16g of computer memory) Mar 13, 2024 pm 06:10 PM

When novice users buy a computer, they will be curious about the difference between 8g and 16g computer memory? Should I choose 8g or 16g? In response to this problem, today the editor will explain it to you in detail. Is there a big difference between 8g and 16g of computer memory? 1. For ordinary families or ordinary work, 8G running memory can meet the requirements, so there is not much difference between 8g and 16g during use. 2. When used by game enthusiasts, currently large-scale games basically start at 6g, and 8g is the minimum standard. Currently, when the screen is 2k, higher resolution will not bring higher frame rate performance, so there is no big difference between 8g and 16g. 3. For audio and video editing users, there will be obvious differences between 8g and 16g.

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

Samsung announced the completion of 16-layer hybrid bonding stacking process technology verification, which is expected to be widely used in HBM4 memory Samsung announced the completion of 16-layer hybrid bonding stacking process technology verification, which is expected to be widely used in HBM4 memory Apr 07, 2024 pm 09:19 PM

According to the report, Samsung Electronics executive Dae Woo Kim said that at the 2024 Korean Microelectronics and Packaging Society Annual Meeting, Samsung Electronics will complete the verification of the 16-layer hybrid bonding HBM memory technology. It is reported that this technology has passed technical verification. The report also stated that this technical verification will lay the foundation for the development of the memory market in the next few years. DaeWooKim said that Samsung Electronics has successfully manufactured a 16-layer stacked HBM3 memory based on hybrid bonding technology. The memory sample works normally. In the future, the 16-layer stacked hybrid bonding technology will be used for mass production of HBM4 memory. ▲Image source TheElec, same as below. Compared with the existing bonding process, hybrid bonding does not need to add bumps between DRAM memory layers, but directly connects the upper and lower layers copper to copper.

Micron: HBM memory consumes 3 times the wafer volume, and production capacity is basically booked for next year Micron: HBM memory consumes 3 times the wafer volume, and production capacity is basically booked for next year Mar 22, 2024 pm 08:16 PM

This site reported on March 21 that Micron held a conference call after releasing its quarterly financial report. At the conference, Micron CEO Sanjay Mehrotra said that compared to traditional memory, HBM consumes significantly more wafers. Micron said that when producing the same capacity at the same node, the current most advanced HBM3E memory consumes three times more wafers than standard DDR5, and it is expected that as performance improves and packaging complexity intensifies, in the future HBM4 This ratio will further increase. Referring to previous reports on this site, this high ratio is partly due to HBM’s low yield rate. HBM memory is stacked with multi-layer DRAM memory TSV connections. A problem with one layer means that the entire

Lexar launches Ares Wings of War DDR5 7600 16GB x2 memory kit: Hynix A-die particles, 1,299 yuan Lexar launches Ares Wings of War DDR5 7600 16GB x2 memory kit: Hynix A-die particles, 1,299 yuan May 07, 2024 am 08:13 AM

According to news from this website on May 6, Lexar launched the Ares Wings of War series DDR57600CL36 overclocking memory. The 16GBx2 set will be available for pre-sale at 0:00 on May 7 with a deposit of 50 yuan, and the price is 1,299 yuan. Lexar Wings of War memory uses Hynix A-die memory chips, supports Intel XMP3.0, and provides the following two overclocking presets: 7600MT/s: CL36-46-46-961.4V8000MT/s: CL38-48-49 -1001.45V In terms of heat dissipation, this memory set is equipped with a 1.8mm thick all-aluminum heat dissipation vest and is equipped with PMIC's exclusive thermal conductive silicone grease pad. The memory uses 8 high-brightness LED beads and supports 13 RGB lighting modes.

See all articles