LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-11-2008, 07:36 AM   #1
JasperB
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Rep: Reputation: 0
Inactive memory issue, Freebsd (memory leak?)


I'm running pfsense firewall on freebsd and I'm having the following problem.

This is the memory usage :

Code:
$ top
last pid: 48536;  load averages:  0.02,  0.03,  0.08  up 2+16:18:30    12:16:31
96 processes:  1 running, 90 sleeping, 5 zombie

Mem: 78M Active, 1503M Inact, 160M Wired, 112M Buf, 260M Free
Swap: 2048M Total, 2048M Free


  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  511 root        1  -8    0 24388K 23164K piperd   0:28  0.78% php
 1047 proxy      19  20    0 36012K 32960K kserel   3:00  0.00% squid
  672 root        1  96    0  6388K  6144K select   0:57  0.00% bsnmpd
  729 root        1   8   20  1932K  1372K wait     0:38  0.00% sh
 1158 zabbix      1   8    5  2592K  1292K nanslp   0:14  0.00% zabbix_agentd
  491 root        1   4    0  3724K  2792K kqread   0:08  0.00% lighttpd
  200 root        1  96    0  1468K  1104K select   0:05  0.00% syslogd
  313 root        1 -58    0  4240K  2532K bpf      0:04  0.00% tcpdump
24045 root        1 -58    0  4100K  2052K bpf      0:04  0.00% bandwidthd
For some reason, all the memory is being put into the Inactive memory.

Right now it only has 70mb of free mem and about 1600mb in inactive. Shouldn't it take some out of inactive and put it in free?

Does this have something to do with a program like NTOP not working properly?

Also see this screenshot for PHPMYSYSinfo.

http://www.xs4all.nl/~jsbosch/pfsense/14.JPG

Is this normal?? When I reboot the firewall the problem is gone and I have a bunch of memory free.

Is this normal? Or is it caused by a mailfunctioning program? Shouldn't it " scrub " the memory which is in inactive?

Last edited by JasperB; 08-11-2008 at 07:38 AM.
 
Old 08-11-2008, 09:43 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You're not using any swap, so the system is not actually "running out" of memory. If it needs to allocate more, it will reclaim inactive memory to do so.

While PHP and Squid have a lot of memory assigned, the system isn't taxed at all for load, so I'm not seeing any problem...
 
Old 08-11-2008, 10:47 AM   #3
JasperB
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
So is it normal that it reserves so much memory in the inactive mem part?

It only has 2mb of physical memory free at the moment and the swap still is not being used.

If I reboot the inactive memory isn't being used I believe, so could it be using it now due to a leaking memory proces?
 
Old 08-11-2008, 11:54 AM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Like I said, if it starts using swap, then you know you have a memory leak. Modern operating systems try to make the most of your RAM by heavily utilizing caching to minimize pulling information off disk. What good is 2GB of RAM if you're only using 400MB and you keep having to go out to disk to read information?
 
Old 08-12-2008, 02:46 AM   #5
JasperB
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
It seems to be using swap now, why is it not using the " buffered" inactive memory?
 
Old 08-12-2008, 04:04 AM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Likely there is a problem with one of the PHP applications, then. What's the output of
Code:
ps auxm
?
 
Old 08-12-2008, 04:10 AM   #7
JasperB
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
http://rafb.net/p/JBA8vI17.html
 
Old 08-12-2008, 04:19 AM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
As expected there are some fairly large PHP processes, but what the heck is "/usr/local/sbin/imspector" and why are there so friggin many of them? That might be a good place to start.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Leak vwaldoguy Linux - Software 5 03-09-2007 10:12 PM
memory leak ? os2 Programming 1 05-19-2005 02:45 PM
Memory Leak?! RoaCh Of DisCor Linux - General 9 05-07-2005 01:26 AM
Memory Leak don_dimo Linux - General 7 03-06-2004 07:51 PM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 10:39 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration