monitoring/controlling mem/swap/shared mem

monitoring/controlling mem/swap/shared mem

Post by peter pils » Tue, 11 Feb 2003 22:06:50



Just implementing an application that uses load of shared memory. The
meaning of shared memory of course is that it stays in memory for very fast
access of data and its not swapped to disk.

So now I'd like to know some basic stategies about monitoring longterm
mem-activities (using board-tools like ps, top, ipcs ... or are there
better tools ?)

Additionally I'd like to know if there are ways to guarantee, that a
specified mem-segment is not swapped at all ?

I feel that this is not the best group for asking such questions, so any
points to more appropriate groups would also be appreatiated.

thnx,
peter

--
peter pilsl

http://www.goldfisch.at

 
 
 

monitoring/controlling mem/swap/shared mem

Post by Sam Trenhol » Wed, 12 Feb 2003 15:58:31


Quote:>So now I'd like to know some basic stategies about monitoring longterm
>mem-activities (using board-tools like ps, top, ipcs ... or are there
>better tools ?)

Well, I'd write a Perl script myself.

Just run free (or ps | grep yourporcess) every second and see what the
process is doing.  

Valgrind is good for finding memory leaks, if that is
what you are trying to do.

Quote:>Additionally I'd like to know if there are ways to guarantee, that a
>specified mem-segment is not swapped at all ?

Only by processes which run as the root user.  I know that GPG can
do this; you may want to look at their source code to see how they
lock memory usage.

Quote:>I feel that this is not the best group for asking such questions, so any
>points to more appropriate groups would also be appreatiated.

One of the comp.os.linux.development. newsgroups may also be able to
help you.

- Sam

--
My email address may be obtained at http://www.samiam.org/ssi/mailme.shtml

 
 
 

1. Q: Mem management in shared mem

Perhaps a simple question: Allocating shared memory is easy but it
would be useful to do some memory management in that allocated area
(i.e. convince free() and malloc() or new and delete to do their
memory allocation and deallocation within the shared memory area).
One solution would be to patch the malloc sources. Any other ideas?

Ciao,
Arno

PS
BTW: I'm aware that any solution requires special synchronisation.
But that is not the problem...

--
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Arno Puder                    

FB Informatik                                      Tel : +49 +69 798-23975
60054 Frankfurt am Main                            Fax : +49 +69 798-22643
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

2. Help Configuring Modem

3. Neww CPU, swap, mem monitor

4. pop3 with authentication

5. AIX 3.2.5 - Removing shared libs from mem/swap...

6. samba passwd encrypt question

7. Need System Call to return %MEM (kernel mem) used by process

8. Dont use linux + Norton DiskLock!

9. FPM main mem mixed with EDO video mem

10. linux mem=64M works, linux mem=128M doesn't ??

11. mmap'ing 2 or more mem-area's to 1 mem-area?

12. e: apache & mod_ssl mem leak (SSLeay 0.9.0b mem leak ?)

13. SOLVED-- Apache Shared Mem Really Isn't Shared