Operating System - HP-UX
1748198 Members
2668 Online
108759 Solutions
New Discussion юеВ

Re: /swap1/paging full, but swapinfo -tm shows all free

 
SOLVED
Go to solution
Patrick Wallek
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

Hmm....As I thought. The file system full messages are showing up because your filesystem /swap1 is at 100%.

I think I have found the reason for the files in that directory. It appears to be normal behavior for filesystem swap.

Here is an excerpt from TKB DOCID KBAN00000895.

Filesystem Swap:
Filesystem swap allows a system administrator to add more swap to the system
even when all of the disk space has been allocated to other logical volumes, and
there is no space left to create a device swap area. With filesystem swap, you
can configure available space within a filesystem to be used for swap.

When allocating filesystem swap, the system will create a directory called paging,
and will create swap files in the paging directory. The system performs writes
to those files if and only if the system physically starts swapping/paging to that
swap area. However, should this occur, system performance will suffer do to the
overhead of maintaining filesystem swap. This is due to the fact that the operating
system is removing pages from physical memory and then writing them to a file,
in small chunks, just like it would for a typical filesystem write. Whereas, when
using a device swap area, the system writes to the swap device in large, raw
chunks of data. For this reason, filesystem swap should only be used as a
temporary solution to a swap problem. Once additional disk space has been
added to the system, the filesystem swap areas should be replaced with device
swap areas as soon as possible.

For performance reasons, if filesystem swap areas do need to be used, it is
suggested to set the priority of the filesystem swap areas to a lower priority
(numerically higher) than device swap areas. Note that if the system only needs
to use the filesystem swap area for the purpose of reserving space, then the
system's performance will not suffer.
Patrick Wallek
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

Here's the link to the full document that I reference above:
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063737520
TWBSupport
Regular Advisor

Re: /swap1/paging full, but swapinfo -tm shows all free

Thanks Gideon.

Is there any harm in deleting the files within the paging directory for now? Will they delete on their own?

Our Oracle dba has been 'testing' certain ways to speed up performance on some Oracle queries on this system & tooling around with some procedures to keep within a cache of some kind for quick response time. I know enough about Oracle to be dangerous, so I'm wondering if what they are experimenting with is causing these files to build.
G. Vrijhoeven
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

Hi,

I would not delete the files in /swap1 i think that will get the kernel/server in trouble... ;-)

If the DBA is testing on a 24/7 production server i would go and have a nice talk with him/her.

Gideon
Patrick Wallek
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

NO, at this point, I wouldn't delete files from that area. Since your filesystem swap has a priority of 0, it is the swap area that is used FIRST. If you delete some of the files, you risk royally messing up processes that are currently running.

At some point in the future, if you must use filesystem swap, I would change the priority of your filesystem swap to 2 so that it gets used LAST. YOu really want your device swap to be used first.

Even better would be to convert this to device swap, rather than filesystem swap.
TWBSupport
Regular Advisor

Re: /swap1/paging full, but swapinfo -tm shows all free

Patrick -
Awesome find! My only issue is I have to schedule downtime on this server since it is 24/7 & by scheduling, I mean, they won't let me down it until the next holiday when the plant is shut down. :o) Once I can get that, I will 're-prioritize' the swap & maybe get rid of the fs swap all together & replace it with device swap.

Gideon -
That's what I thought you were going to say. I need to find some way to clear this then to buy me time until the next holiday. If I can't replace the fs swap with device swap, then I will add some more additional swap space on another volume.
We do have a sandbox identical server that testing is suppose to be done on..... but for some reason it never is...
Patrick Wallek
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

At this point, I wouldn't worry too much about the filesystem swap area filling up. Once that whole area is used by processes reserving swap space, new processes will then start using your device swap area to reserve swap space. I wouldn't clear anything out of that filesystem swap area.
Bill Hassell
Honored Contributor

Re: /swap1/paging full, but swapinfo -tm shows all free

VERY IMPORTANT: never assign filesystem swap a higher priority than deviuce swap. As the tech note states, filesystem swap is very expensive (read: slowwwww) so change the priority of /swap1 to 1 (you could make it any number greate than device swap). Also, do not remove any files in the paging directory--it's the same as removing physical RAM while the system is running, a panic will occur soon. The swap space has been reserved so it can never be recovered until a reboot. Since there is nothing on this lvol except swap, change it to raw device swap at your next reboot.

As far as memory issues go, 90% of the Oracle memory issues are seldom related to actual RAM or swap availability. Instead, the limits come from things like 32bit apps, ulimit, maxdsiz, shmmax, shmseg. swapinfo verifies this since there is no measureable swap being used. With 8Gb of RAM, you should have plenty of space for a 64bit Oracle 9i instance. The only time Oracle uses massive amount of RAM and swap space is during installation. Otherwise, the executables are fairly stable (no major changes in RAM usage) and shared memory (SGA) is controlled by the config files.


Bill Hassell, sysadmin
TWBSupport
Regular Advisor

Re: /swap1/paging full, but swapinfo -tm shows all free

Thanks for the advice Bill!