Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Go to solution
TWBSupport
Regular Advisor

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

Hi All -
About 5 minutes ago, I rec'd a message from my 11i server that /swap1 is at 100% full. EEK! I immediately did a swapinfo -tn & got the following:
swapinfo -tn
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
localfs 4190208 0 4190208 0% none 0 0 /swap1/paging
reserve - 8384512 -8384512
memory 6457976 5004248 1453728 77%
total 14842488 13388760 1453728 90% - 0 -

It shows that swap1 has 4190208 free & is not being used.

If I look at /swap1/paging, it is filled with files from aprox 1 hour ago to now. We have 8G RAM ,4G device swap, & 4G fs swap.

Help! This server is our production server & is a 24/7 box. I want to make sure I am on top of this & would like any explaination of the differences or suggestions to alleviate this issue.

Thanks a ton
18 REPLIES
Pete Randall
Outstanding Contributor

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

Belynda,

I've never used FS swap so forgive me for sounding naive. I wouldn't think that you would see identifiable files in a swap area - what are the chances that something or someone is actually writing files to this area?


Pete

Pete
G. Vrijhoeven
Honored Contributor
Solution

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

Hi,

When a proces starts it reserves a part of the swap space, just in case it needs to swap out. It does not mean it is used, it is reserved just in case. Your system has 8 GB mem and 8 Gb swap. I think if you expand your swap space you are out of trouble, but i would suggest doing it on an other lvol and not on the filesystem. If that is not possible (maxswapchunks to high) i am afraid it needs some down time....

HTH,

Gideon
Steven E. Protter
Exalted Contributor

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

Can you post the message you got from the server?

Does not look to me like any swap is in use.

It might be possible the swap is not enabled, maybe you should check that.

/swap1 message by itself is not a problem because you have two swap areas.

I personally would change the priority settings.

I'd make the faster device swap priority zero(used first) and then this fs swap priority 1(used second).

This change may require a boot.

I'm lazy about swap and use sam to do these changes, since they happen here once every couple of years.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kent Ostby
Honored Contributor

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

What you're probably seeing is that the space is being RESERVED and hence it is used, even if it is not being actively swapped out to.

Best regards,
Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
TWBSupport
Regular Advisor

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

WOW! You guys are great! :o)

Pete -
As far as I know, there is no chance of someone else actually writing files there. It's owned by root alone & I are root. :o) The paging files are named servername.2280, servername.2281 all the way up to servername.4033. They are all aprox 2Mb of nothing. I ftp'd one to my workstation to open it up & they are all empty.

G -
So this is a major deal?? I have had so much trouble with the memory & SWAP on this system. We're running 9i & at first didn't have enough memory to make 9i happy, so I had to increase SWAP to alleviate that problem until we rec'd our memory, then I installed the extra memory & was told the 8G of SWAP for 8G of memory is more than enough. Now you're saying I should add MORE swap? Is there ever enough SWAP? :o)

Steven -
It's just an alert message that I send to root if any directories get over a certain %, here it is though... "The Minimum Free Space Threshold for the following filesystems
was exceeded."

tw053s01: Running out of space on /swap1. Currently 100%"

Swap is enabled, I checked that.

I was reading on another post that the priorities should be the same, now, as you can see I do have the priorities different. Your suggestion would be go with device over fs priority for quicker response. I'm not trying to question your help, I'm just trying to understand what is happening & how to fix it.
Patrick Wallek
Honored Contributor

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

What do you get if you do a:

# bdf /swap1/paging

TWBSupport
Regular Advisor

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

Patrick -
Here ya go...
bdf /swap1/paging
Filesystem kbytes used avail %used Mounted on
/dev/vg00/swap1 4194304 4192901 1323 100% /swap1
G. Vrijhoeven
Honored Contributor

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

Hi,

I do not know if there is ever enough swap space ..... We have RP7410 running SAP with 10 GB memory and 20 GB swap for the first instance and 10 Gb for the next one (also Oralce). The swap space is hardly used but it is needed to keep SAP/Oralce happy.
So i am not sure. May be Oralce/SAP has some seagate/wd shares....

The priority settings for swap space work so if you have multiple disks with swap configured you want all the swap needed equaly devided over those disks so the same prio can be best. If you have multiple swap spaces on one disk / swap and fsswap you better put more prio on the ( lvol) swap device.

Regards!

Gideon


G. Vrijhoeven
Honored Contributor

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

Hi again.

The filesystem swap full does not mean swap is full. I would not worry if i was you.
Trust swapinfo -tam on this one.
To be sure check swap settings with glance.

Gideon

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!