Re: large number of shared memory segments
Posted in 1999
Sean Kelsey wrote:
>
> IDS 7.24.UC5, HP9000 running HP-UX 11.0
>
> We had an interesting situation last night where the server
> un-surprisingly ) appeared to not accept any user requests from either
> soctcp or shmem connections even though the engine was up and running and
> was issuing checkpoints. We couldn't manually issue checkpoints either, the
> terminal would freeze, and no onmode commands would work. Having ensured
> that no processes were in critical sections, I eventually had to kill the
> master oninit process using kill -11 ( -9 is a no no I know ).
Ouch!
> The onstat commands appeared to be working fine providing whatever stats we
> wanted, one of which was the onstat -g seg which gave us about 32 additional
> V segments each 8MB in size.
Default sizes.
> ( at this point alarm bells started to ring ).
Good.
> My problem, however, was that I didn't know of a way to trace back what
> process ( or processes ) caused so many segments to be added in such a short
> time - over a period of about 1 hour.
>
> Can any of you guys/galls point me in a few directions that I may need to
> investigate so that if/when it happens again, I can narrow the search down
> to a particular user/process AQAP.
The only way you can get this sort of info is to monitor individual
session's memory usage. Something like onstat -g ses. But of course,
CATCHING the culprits is another story. Perhaps you can set up a cron
job to store stats over a period of time.
> I have already upped the SHMVIRTSIZE to 750MB ( from 500MB) and SHMADD to
> 64MB ( from 8MB) to reduce the number of segments the next time it needs to
> add them, and also implemented a script to raise the alarm if > 3 segments
> get allocated.
Good.
> I must point out that this happened when there were relatively few ( ~300 )
> users on the system not running anything massive.
>
> I wait with baited breath.
Try a breath mint. :-)
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
|Mark D. Stock - Informix SA http://www.informix.com |//////// /|
|mailto:mdstock@informix.com http://www.informix.com/idn |///// / //|
|http://www.iiug.org +-----------------------------------+//// / ///|
| Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////|
| Fax: +27 838250 2325 |If it's fast, the users keep quiet.|// / /////|
|Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////|
+----------------------+-----------------------------------+-----------+