OracleStudy之--IPCS管理共享内存
Oracle Study之--IPCS管理共享内存 U nix/linux下的共享内存、信号量、队列信息管理 在unix/linux下,经常有因为共享内存、信号量,队列等共享信息没有干净地清除而引起一些问题。 查看共享信息的内存的命令是:ipcs [-m|-s|-q]。 默认会列出共享内存、信号量
Oracle Study之--IPCS管理共享内存
Unix/linux下的共享内存、信号量、队列信息管理
在unix/linux下,经常有因为共享内存、信号量,队列等共享信息没有干净地清除而引起一些问题。
查看共享信息的内存的命令是:ipcs [-m|-s|-q]。
默认会列出共享内存、信号量,队列信息
-m列出共享内存
-s列出共享信号量
-q列出共享队列
清除命令是:ipcrm [-m|-s|-q] id。
-m 删除共享内存
-s删除共享信号量
-q删除共享队列。
案例分析:
[oracle@trade_as02 ~]$ ipcs -a ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x30024289 32768 futures 777 528384 1 0xca2fd414 491521 oracle 640 1730150400 16 ------ Semaphore Arrays -------- key semid owner perms nsems 0x00028009 0 futures 666 1 0x0002800c 32769 futures 666 1 0x30024003 262146 futures 777 3 0x3002428a 294915 futures 777 2 0x3002428b 327684 futures 777 2 0x3002428c 360453 futures 777 2 0x3002428d 393222 futures 777 2 0x3002428e 425991 futures 777 2 0x52dff7d0 3964936 oracle 640 151 0x52dff7d1 3997705 oracle 640 151 0x52dff7d2 4030474 oracle 640 151 0x52dff7d3 4063243 oracle 640 151 0x52dff7d4 4096012 oracle 640 151 ------ Message Queues -------- key msqid owner perms used-bytes messages
共享内存段有时不能马上删除,需使用这个内存段的所有进程向OS发送detach命令时才有释放,此时可以考虑删除进程使用的信号量,帮助释放共享内存段
相关知识:信号量、资源释放、ipcs、ipcrm
信号量又称为信号灯,它是用来协调不同进程间的数据对象的,而最主要的应用是共享内存方式的进程间通信。本质上,信号量是一个计数器,它用来记录对某个资源(如共享内存)的存取状况;共享内存是运行在同一台机器上的进程间通信最快的方式,因为数据不需要在不同的进程间复制。通常由一个进程创建一块共享内存区,其余进程对这块内存区进行读写。在Linux系统下 ,常用的方式是通过shmXXX函数族来实现利用共享内存进行存储的。如Shmget,类似于 malloc函数
ipcs可用来显示当前Linux系统中的共享内存段、信号量集、消息队列等的使用情况。
命令示例: ipcs -a或ipc 显示当前系统中共享内存段、信号量集、消息队列的使用情况; ipcs -m 显示共享内存段的使用情况; ipcs -s 显示信号量集的使用情况; ipcs -q 显示消息队列的使用情况;
ipcrm可用来删除对应的共享内存段、信号量、消息队列;
命令示例: ipcrm -s semid 删除对应的信号量集 ipcrm -m shmid 删除对应的共享内存段 ipcrm -q msqid 删除对应的消息队列 ipcrm本身只能实现单个资源的删除,利用以下命令可实现批量删除: 1.ipcs -s|grep 用户名|cut -d" " -f2|xargs -n1 ipcrm -s 2.ipcs -s|awk '/用户名/{print $2}'|xargs -n1 ipcrm -s 3.ipcs -s|awk '/用户名/{system("ipcrm -s "$2)}' 4.for i in echo `ipcs|grep 用户名|cut -d" " -f2`; do ipcrm -s $i; done
更深入的了解:
Oracle 内存段参数设定: [root@rh6 ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

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

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.

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.

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

In daily life and work, we often need to share files and folders between different devices. Windows 11 system provides convenient built-in folder sharing functions, allowing us to easily and safely share the content we need with others within the same network while protecting the privacy of personal files. This feature makes file sharing simple and efficient without worrying about leaking private information. Through the folder sharing function of Windows 11 system, we can cooperate, communicate and collaborate more conveniently, improving work efficiency and life convenience. In order to successfully configure a shared folder, we first need to meet the following conditions: All devices (participating in sharing) are connected to the same network. Enable Network Discovery and configure sharing. Know the target device

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
