开发者

Oracle DB on solaris utilizing swap memory when free RAM available

开发者 https://www.devze.com 2023-02-08 12:58 出处:网络
We have a weird instance where we noticed our oracle database server swap utilization was 100% and surprised to see that the system had free memory available during that period. To my knowledge, swap

We have a weird instance where we noticed our oracle database server swap utilization was 100% and surprised to see that the system had free memory available during that period. To my knowledge, swap memory utilization starts once system runs out of free RAM (please correct me if i'm wrong). Not sure what could have caused this unusual activity. Had anyone else experienced such behavi开发者_C百科our?

Regs,


If you are using solaris 10 or later, system parameters are not in /etc/system anymore. Instead, you configure dynamically managed resources through "projects" at the zone, task or user level.

Here is for instance one of these project config files in one of our zones.

system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:100:Oracle:::process.max-sem-nsems=(privileged,256,deny);project.ma-shm-ids=(privileged,256,deny);project.max-shm-memory=(privileged,42949672960,dny)

The settings here mean that a user of username oracle will benefit of a specific resource setting.

To set add such a line to the project file you use the projadd command. To modify it the projmod command and if you want to list all the resources currently available to oracle you would

  1. su to oracle
  2. type:

    prctl -i project user.oracle

This will list all resources available to that 'project'.


You should provide details on how you get your metrics but there is no direct relationship between swap and RAM utilization. You certainly can get out of swap space with free RAM still available.

There must be enough swap for all (virtual) memory reservations to fit. Memory reservation (i.e. malloc) use no RAM. RAM is only required during virtual memory access.


Oracle DB running on Solaris has a "bug". It is "reserving" swap on an Operating system where "swap" and "ram" are combined into one virtual memory pool. Reserving swap just exhausts the disk based swap area for no reason and should not be doing this at all. All transitioning between ram and swap is handled by the Solaris OS itself. It took me almost 5 years to get Sun/Oracle to understand the exact same problem with Java.

Latest Java 7 and 8 no longer "double dip" into the memory pool.

What I've found, in cases where the OS runs into a "Swap" limit is to size the memory accordingly, and remove swap altogether.

With zero swap available, all memory interactions are in physical ram and you won't see the double dip issue, and you won't see errors about swap exhaustion as long as you have sufficient ram for everything to run.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号