f



Size

Hi all,
My code(c/c++) runs as a server on a gnu/linux box. it does multithreading,
socket and database(oci) stuff. The problem is that by using top I found its
"size" and "rss" are around 150M, and it takes 3.7% under " %mem" at run
time.  Is it normal? if not, any clues on fixing it.

TIA


-s


0
Sam
6/23/2003 11:59:15 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

2 Replies
1008 Views

Similar Articles

[PageSpeed] 42

"Sam" <sam@somewhere.com> wrote in message
news:wpMJa.16004$6o.7103@news.primus.ca...
> Hi all,
> My code(c/c++) runs as a server on a gnu/linux box. it does
multithreading,
> socket and database(oci) stuff. The problem is that by using top I found
its
> "size" and "rss" are around 150M, and it takes 3.7% under " %mem" at run
> time.  Is it normal? if not, any clues on fixing it.
>
btw, mem leaks can be detected by using top?


0
Sam
6/24/2003 12:02:29 AM
"David Schwartz" <davids@webmaster.com> wrote:
>     Can you paste the actual output of 'top'? You may be misreading it.
> Also, paste the output of 'free'.

Top:
  1:45pm  up 39 days, 33 min,  4 users,  load average: 0.42, 0.49, 0.21
69 processes: 64 sleeping, 5 running, 0 zombie, 0 stopped
CPU states: 25.9% user,  7.5% system,  0.0% nice, 66.4% idle
Mem:  2316656K av, 2308396K used,    8260K free,     440K shrd,  210564K
buff
Swap: 2097096K av,   12064K used, 2085032K free                 1889972K
cached
  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
32070  sam     15   0  108M 108M  3504 R    12.7  4.8   0:48 apisrv
32069  sam     16   0  108M 108M  3504 S    11.3  4.8   0:48 apisrv
29665  sam     15   0  1324 1104  1060 S     0.0  0.0   0:00 tcsh
29744  sam     15   0  1328 1328   796 S     0.0  0.0   0:00 tcsh
32065  sam     15   0  108M 108M  3504 S     0.0  4.8   0:01 apisrv
32066  sam     15   0  108M 108M  3504 S     0.0  4.8   0:00 apisrv
32067  sam     15   0  108M 108M  3504 S     0.0  4.8   0:00 apisrv
32068  sam     15   0  108M 108M  3504 S     0.0  4.8   0:00 apisrv
32071  sam     15   0  108M 108M  3504 S     0.0  4.8   0:00 apisrv
32218  sam     15   0   968  968   760 R     0.0  0.0   0:00 top
32223  sam     16   0  108M 108M  3504 S     0.0  4.8   0:00 apisrv

free:
             total       used       free     shared    buffers     cached
Mem:       2316656    2311004       5652        440     210656    1892512
-/+ buffers/cache:     207836    2108820
Swap:      2097096      12060    2085036

Interesting thing is that even without running my app (apisrv), the used mem
will still increase until closes to the total (no zombies), why?


0
Sam
6/24/2003 7:04:29 PM
Reply: