Operating System - HP-UX
1748169 Members
3911 Online
108758 Solutions
New Discussion юеВ

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

 
SOLVED
Go to solution
PatRoy
Regular Advisor

HPUX 11.31 -> Disabling Pseudo-Swap??

I've been reseaching on how to control this pseudo-swap on hpux 11.31. I don't want to turn it off has it seems to be necessary for proper system functionning... (as per http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1229067)

But here's the issue I'm having:

I've got 2 swap disk devices:
[root@NCRCI]:/$ swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10485760 0 10485760 0% 0 - 1 /dev/vg00/lvol2
dev 27262976 0 27262976 0% 0 - 1 /dev/vg01/swap
reserve - 37586160 -37586160
memory 47841364 7391740 40449624 15%

One is 10G, the other 26G. As you can see, my server has 48G of system memory total.

The server is used to only serve a Sybase Database. Problem is that pseudo-swap sometimes goes to 7Gigs, sometimes to 10Gigs, etc... depending on what's running. (i.e. is sybase started or not).

The DBA's are trying to force a memory allocation of 38Gigs straight to Sybase when starting it... Obviously, if 48Gigs - current OS memory used + pseudo-swap is lower then when they're trying to allocate, then the startup of sybase fails!

1) what can I do to limit the amount pseudo-swap... if it's even possible?

2) If they already started Sybase.. then stop it for whatever reasons.... after a while, pseudo will increase by itself. When they try to start Sybase again with the same settings as previous startup, it will fail because pseudo is taking to much... How can I "reduce it on the fly" ??

Many thanks for clarifying this... :)

Patrick.



25 REPLIES 25
Jeff Schussele
Honored Contributor
Solution

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Hey PR (Can I call you that?),

What you're seeing is "runaway" processes in my mind.
IF an app takes memory - by God it should give *all* of it up when it dies.
Unfortunately a lot don't.

Don't *ever* let DBAs tell you how to admin your servers. Just politely tell them to keep their tables in order...;~))

Processes that suck up large amounts of memory & then don't release them properly are the #1 bane of all SAs - PERIOD!!!

There are a lot of kernel monitors out there that will verify these conditions.

Best Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
PatRoy
Regular Advisor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Haahhh!!! I like how you think Jeff!!! :o)

So basically, there's not a damn thing I can do about it... is what you're saying? And when such a thing happens (i.e. pseudo going up after Sybase was stopped... then sybase not starting), my only option is really to kick the box down to release it.... right?

PatRoy
Regular Advisor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Also, what would happen if I increased the physical swap? That IS a possibility for me... I mean... shouldn't swap be equal to the same amount as the physical memory? That's how I had learned it in the past... no?

Thanks again. P.
Jeff Schussele
Honored Contributor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Hi Patrick,

There is only onen off pseudo-swap.
Set memswap_on to off in kernel parms & reboot.
But frankly, I'd never do that - it tends to come handy...

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
PatRoy
Regular Advisor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

You mean the swapmem_on boolean right? That's obsolete in V3. No longer available...

Don Morris_1
Honored Contributor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

No, your system probably has 55Gb or so. v3 doesn't give per-page metadata to the reservable memory layer, and Memory swap by default should be 90% of the memory given to the reservable memory layer.

"Obviously, if 48Gigs - current OS memory used + pseudo-swap is lower then when they're trying to allocate, then the startup of sybase fails!"

Ok... this isn't obvious to me. Can you elaborate on what you mean here?

First thing to question -- are you talking about a 38Gb *virtual* allocation or is this an allocation which is to be created and faulted/locked in memory? If you're failing to create a 38Gb virtual object -- that is not related to free memory [at all], but rather this is all about swap reservation.

So what may be happening is that you've only got 36Gb of device swap. 158Mb of that has not yet been consumed by reservations. 15% of pseudo-swap has been reserved (could be from User space, could be implicitly by memory locked pages [kernel dynamic is considered such]).

So your remaining reservable swap is 38.5757Gb + 158Mb. I will note that there's a known issue that HP-UX won't properly allow swap reservation that crosses memory swap *and* non-memory swap... so that means you're limited to the larger of what's available for a single virtual object. In this case, 38.5757Gb is the largest single object you could make at that instant.

If what you're trying to say is that if the process of bringing up Sybase (or other processes concurrent) consume the last 158Mb of device swap and more than .5757Gb of memory swap your 38Gb single virtual allocation fails -- yes, yes it will.

As an aside, if you're talking mlock(2) in addition, things get more complex since there are quotas on lockable memory as well that would come into play -- let's leave that alone since it sounds like just a swap problem.

1) It is not possible without treading into undocumented and unsupported methods. Obviously, I'm not going to elaborate.

More to the point -- why do you think lowering the amount of memory swap would help you? As noted above -- only the current available memory swap in your swapinfo output would have a chance to get your object built. You need more memory swap (more RAM, reduce other load) -- not less.

2) Yes, that is likely kernel dynamic memory allocations coming into play. You could reduce it by causing memory pressure (forcing the kernel garbage collector to kick in) or possibly by temporarily lowering filecache_max / filecache_min to force pages and some metadata out of the File Cache, reducing the kernel allocations again.

In practice, though -- it would be much simpler if you added device swap -- when/if Sybase succeeds in coming up, your output implies your system would be running very close to 100% swap reservation. Which means you can easily start getting ENOMEM from such system calls as fork(2), exec(2), malloc, mmap, etc.... the difficulty here is that it may be impossible/very difficult to log in to fix this later if the system gets into this state, or to run the commands required even if you can log in. Adding RAM would work as well -- but in this case, it looks like just swap is all you need.
David P Lavoie
Frequent Advisor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Hello all,

Me and Pat are coworkers and we're currently working on that issue. We're going live in a couple of days and the problem explained by Pat happened yesterday. I think our main question would be :

Sybase loads with a mlock of 35 GB. We want to know if there's a way to lock the system so he doesn't user more than 10 GB. Is it possible? If yes, how.

All values were set to default in Kernel.

Thanks all for your input.
Dennis Handly
Acclaimed Contributor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

>I've got 2 swap disk devices: $ swapinfo

Can you please provide the "swapinfo -tam" output when the system is busy.

You have a lot of swap reserved but only 7 Gb of memory used.

>1) what can I do to limit the amount pseudo-swap?

Why? Use of pseudo-swap is a good thing. The only way to reduce it is to cut down on the load.
Don Morris_1
Honored Contributor

Re: HPUX 11.31 -> Disabling Pseudo-Swap??

Thanks -- knowing this is a lockable memory issue instead of a swap issue (per se -- obviously locked memory tries to reserve from memory swap) is helpful data.

If you want to limit Sybase to be able to mlock no more than 10Gb, you should probably look into Process Resource Management (or encapsulating products like WLM/gWLM). That would enable you to put Sybase (and related processes) into a memory silo [as it were] with restricted levels. (Or just configure Sybase to not eat more than 10Gb... surely this is a configuration option at the application level as well?)

Otherwise -- to restrict all of user space lockable memory on v3, you're back in undocumented/unsupported land. PRM is where you want to go.