Solaris 上的 Oracle DB 在可用 RAM 时利用交换内存

发布于 2024-10-15 08:51:41 字数 155 浏览 5 评论 0原文

我们有一个奇怪的实例,我们注意到我们的 Oracle 数据库服务器交换利用率为 100%,并且惊讶地发现系统在此期间有可用的可用内存。据我所知,一旦系统耗尽可用内存,交换内存就会开始使用(如果我错了,请纠正我)。不确定是什么导致了这种异常活动。还有其他人经历过这种行为吗?

法规,

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 behaviour?

Regs,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

故事和酒 2024-10-22 08:51:41

如果您使用的是 Solaris 10 或更高版本,则系统参数不再位于 /etc/system 中。相反,您可以通过区域、任务或用户级别的“项目”配置动态管理资源。

例如,这是我们区域之一中的这些项目配置文件之一。

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)

这里的设置意味着用户名 oracle 的用户将受益于特定的资源设置。

要设置将这样的行添加到项目文件中,请使用 projadd 命令。要修改它,请使用 projmod 命令,如果您想列出 Oracle 当前可用的所有资源,您可以

  1. su to oracle
  2. type:

    prctl -i project user.oracle

这将列出该“项目”可用的所有资源。

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'.

樱花细雨 2024-10-22 08:51:41

您应该提供有关如何获取指标的详细信息,但交换和 RAM 利用率之间没有直接关系。您当然可以在空闲 RAM 仍然可用的情况下退出交换空间。

必须有足够的交换空间来容纳所有(虚拟)内存预留。内存预留(即 malloc)不使用 RAM。仅在访问虚拟内存时才需要 RAM。

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.

嘿哥们儿 2024-10-22 08:51:41

在 Solaris 上运行的 Oracle DB 有一个“bug”。
它是操作系统上的“保留”交换,其中“交换”和“RAM”组合成一个虚拟内存池。
保留交换只会无缘无故地耗尽基于磁盘的交换区域,根本不应该这样做。
RAM 和交换区之间的所有转换均由 Solaris 操作系统本身处理。
我花了近 5 年的时间才让 Sun/Oracle 理解了 Java 的完全相同的问题。

最新的 Java 7 和 8 不再“双重浸入”内存池。

我发现,如果操作系统遇到“交换”限制,则相应地调整内存大小,并完全删除交换。

在可用零交换的情况下,所有内存交互都在物理内存中,您不会看到双浸问题,并且只要您有足够的内存来运行所有内容,您就不会看到有关交换耗尽的错误。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文