Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-07 Thread Luke Marsden
On Wed, 2012-03-07 at 10:23 +0200, Konstantin Belousov wrote:
 On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote:
  I'm trying to confirm that, on a system with no pages swapped out, that
  the following is a true statement:
  
  a page is accounted for in active + inactive if and only if it
  corresponds to one or more of the pages accounted for in the
  resident memory lists of all the processes on the system (as per
  the output of 'top' and 'ps')
 No.
 
 The pages belonging to vnode vm object can be active or inactive or cached
 but not mapped into any process address space.

Thank you, Konstantin.  Does the number of vnodes we've got open on this
machine (272011) fully explain away the memory gap?

Memory gap:
11264M active + 2598M inactive - 9297M sum-of-resident = 4565M

Active vnodes:
vfs.numvnodes: 272011

That gives a lower bound at 17.18Kb per vode (or higher if we take into
account shared libs, etc); that seems a bit high for a vnode vm object
doesn't it?

If that doesn't fully explain it, what else might be chewing through
active memory?

Also, when are vnodes freed?

This system does have some tuning...
kern.maxfiles: 100
vm.pmap.pv_entry_max: 73296250

Could that be contributing to so much active + inactive memory (5GB+
more than expected), or do PV entries live in wired e.g. kernel memory?


On Tue, 2012-03-06 at 17:48 -0700, Ian Lepore wrote:
 In my experience, the bulk of the memory in the inactive category is
 cached disk blocks, at least for ufs (I think zfs does things
 differently).  On this desktop machine I have 12G physical and
 typically have roughly 11G inactive, and I can unmount one particular
 filesystem where most of my work is done and instantly I have almost
 no inactive and roughly 11G free.

Okay, so this could be UFS disk cache, except the system is ZFS-on-root
with no UFS filesystems active or mounted.  Can I confirm that no
double-caching of ZFS data is happening in active + inactive (+ cache)
memory?

Thanks,
Luke

-- 
CTO, Hybrid Logic
+447791750420  |  +1-415-449-1165  | www.hybrid-cluster.com 



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-07 Thread J B
On Wed, 07 Mar 2012 10:23:38 +0200, Konstantin Belousov wrote:

 On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote:
 ...
 I'm trying to confirm that, on a system with no pages swapped out, that
 the following is a true statement:

 a page is accounted for in active + inactive if and only if it
 corresponds to one or more of the pages accounted for in the
 resident memory lists of all the processes on the system (as
 per the output of 'top' and 'ps')
 No.

 The pages belonging to vnode vm object can be active or inactive or
 cached but not mapped into any process address space.

I wonder if some ideas by Denys Vlasenko contained in this thread
http://comments.gmane.org/gmane.linux.redhat.fedora.devel/157706
would be useful ?

...
Today, I'm looking at my process list, sorted by amount of dirtied pages
(which very closely matches amount of malloced and used space - that is,
malloced, but not-written to memory areas are not included).
This is the most expensive type of pages, they can't be discarded.
If we would be in memory squeeze, kernel will have to swap them out,
if swap exists, otherwise kernel can't do anything at all.
...
Note that any shared pages (such as glibc) are not freed this way;
also, non-mapped pages (such as large, but unused malloced space, or large,
but unused file mappings) also do not contribute to MemFree increase.

jb
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-07 Thread Luke Marsden
On Wed, 2012-03-07 at 13:33 +0100, J B wrote:
 On Wed, 07 Mar 2012 10:23:38 +0200, Konstantin Belousov wrote:
 
  On Wed, Mar 07, 2012 at 12:36:21AM +, Luke Marsden wrote:
  ...
  I'm trying to confirm that, on a system with no pages swapped out, that
  the following is a true statement:
 
  a page is accounted for in active + inactive if and only if it
  corresponds to one or more of the pages accounted for in the
  resident memory lists of all the processes on the system (as
  per the output of 'top' and 'ps')
  No.
 
  The pages belonging to vnode vm object can be active or inactive or
  cached but not mapped into any process address space.
 
 I wonder if some ideas by Denys Vlasenko contained in this thread
 http://comments.gmane.org/gmane.linux.redhat.fedora.devel/157706
 would be useful ?

https://github.com/pixelb/scripts/blob/master/scripts/ps_mem.py

This looks like a really useful script, and looks like it works under
FreeBSD with linprocfs.

Good find!

Cheers,
Luke

 ...
 Today, I'm looking at my process list, sorted by amount of dirtied pages
 (which very closely matches amount of malloced and used space - that is,
 malloced, but not-written to memory areas are not included).
 This is the most expensive type of pages, they can't be discarded.
 If we would be in memory squeeze, kernel will have to swap them out,
 if swap exists, otherwise kernel can't do anything at all.
 ...
 Note that any shared pages (such as glibc) are not freed this way;
 also, non-mapped pages (such as large, but unused malloced space, or large,
 but unused file mappings) also do not contribute to MemFree increase.
 
 jb

-- 
CTO, Hybrid Logic
+447791750420  |  +1-415-449-1165  | www.hybrid-cluster.com 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-06 Thread Chuck Swiger

On 3/6/2012 2:13 PM, Luke Marsden wrote:
[ ... ]

My current (probably quite simplistic) understanding of the FreeBSD
virtual memory system is that, for each process as reported by top:

   * Size corresponds to the total size of all the text pages for the
 process (those belonging to code in the binary itself and linked
 libraries) plus data pages (including stack and malloc()'d but
 not-yet-written-to memory segments).


Size is the amount of the processes' VM address space which has been assigned; 
the various things you mention indeed are the common things which consume 
address space, but there are others like shared memory (ie, SysV shmem stuff), 
memory-mapped hardware like a video card VRAM buffer, thread-local storage, etc.



   * Resident corresponds to a subset of the pages above: those pages
 which actually occupy physical/core memory.  Notably pages may
 appear in size but not appear in resident for read-only text
 pages from libraries which have not been used yet or which have
 been malloc()'d but not yet written-to.


Yes.


My understanding for the values for the system as a whole (at the top in
'top') is as follows:

   * Active / inactive memory is the same thing: resident memory from
 processes in use.  Being in the inactive as opposed to active
 list simply indicates that the pages in question are less
 recently used and therefore more likely to get swapped out if
 the machine comes under memory pressure.


Well, they aren't exactly the same thing.  The kernel implements a VM working 
set algorithm which periodically looks at all of the pages that are in memory 
and notes whether a process has accessed that page recently.  If it has, the 
page is active; if the page has not been used for some time, it becomes 
inactive.


If the system has plenty of memory, it will not page or swap anything out.  If 
it is under mild memory pressure, it will only consider pages which are 
inactive or cache as candidates for which it might page them out.  Only under 
more severe memory pressure will it start looking to swap out entire processes 
rather than just page individual pages out.


[ Although, the FreeBSD implementation supposedly will try to balance the size 
of the active, inactive, and cache lists (or queues), so it is looking at the 
active list also-- but you don't want to page out an active page unless you 
really have to, and if you have to do that, maybe you might as well free up 
the whole process and let something have enough room to run. ]



   * Wired is mostly kernel memory.


It's normally all kernel memory; only a rare handful of userland programs such 
as crypto code like gnupg ever ask for wired memory, AFAIK.



   * Cache is freed memory which the kernel has decided to keep in
 case it correspond to a useful page in future; it can be cheaply
 evicted into the free list.


Sort of, although this description fits the inactive memory category also.

The major distinction is that the system is actively trying to flush any dirty 
pages in the cache category, so that they are available for reuse by something 
else immediately.



   * Free memory is actually not being used for anything.


Yes, although the system likes to have at least a few pre-zeroed pages handy 
in case an interrupt handler needs them.



It seems that pages which occur in the active + inactive lists must
occur in the resident memory of one or more processes (or more since
processes can share pages in e.g. read-only shared libs or COW forked
address space).


Everything in the active and inactive (and cache) lists are resident in 
physical memory.



Conversely, if a page *does not* occur in the resident
memory of any process, it must not occupy any space in the active +
inactive lists.


Hmm...if a process gets swapped out entirely, the pages for it will be moved 
to the cache list, flushed, and then reused as soon as the disk I/O completes. 
 But there is a window where the process can be marked as swapped out (and 
considered no longer resident), but still has some of it's pages in physical 
memory.



Therefore the active + inactive memory should always be less than or
equal to the sum of the resident memory of all the processes on the
system, right?


No.  If you've got a lot of process pages shared (ie, a webserver with lots of 
httpd children, or a database pulling in a large common shmem area), then your 
process resident sizes can be very large compared to the system-wide 
active+inactive count.



This missing memory is scary, because it seems to be increasing over
time, and eventually when the system runs out of free memory, I'm
certain it will crash in the same way described in my previous thread
[1].


I don't have enough data to fully evaluate the interactions with ZFS; you can 
easily get system panics by running out of KVA on a 32-bit system, but that 
shouldn't apply 

Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-06 Thread Luke Marsden
Thanks for your email, Chuck.

  Conversely, if a page *does not* occur in the resident
  memory of any process, it must not occupy any space in the active +
  inactive lists.
 
 Hmm...if a process gets swapped out entirely, the pages for it will be moved 
 to the cache list, flushed, and then reused as soon as the disk I/O 
 completes. 
   But there is a window where the process can be marked as swapped out (and 
 considered no longer resident), but still has some of it's pages in physical 
 memory.

There's no swapping happening on these machines (intentionally so,
because as soon as we hit swap everything goes tits up), so this window
doesn't concern me.

I'm trying to confirm that, on a system with no pages swapped out, that
the following is a true statement:

a page is accounted for in active + inactive if and only if it
corresponds to one or more of the pages accounted for in the
resident memory lists of all the processes on the system (as per
the output of 'top' and 'ps')

  Therefore the active + inactive memory should always be less than or
  equal to the sum of the resident memory of all the processes on the
  system, right?
 
 No.  If you've got a lot of process pages shared (ie, a webserver with lots 
 of 
 httpd children, or a database pulling in a large common shmem area), then 
 your 
 process resident sizes can be very large compared to the system-wide 
 active+inactive count.

But that's what I'm saying...

sum(process resident sizes) = active + inactive

Or as I said it above, equivalently:

active + inactive = sum(process resident sizes)

The data I've got from this system, and what's killing us, shows the
opposite: active + inactive  sum(process resident sizes) - by over 5GB
now and growing, which is what keeps causing these machines to crash.

In particular:
Mem: 13G Active, 1129M Inact, 7543M Wired, 120M Cache, 1553M Free

But the total sum of resident memories is 9457M (according to summing
the output from ps or top).

13G + 1129M = 14441M (active + inact)  9457M (sum of res)

That's 4984M out, and that's almost enough to push us over the edge.

If my understanding of VM is correct, I don't see how this can happen.
But it's happening, and it's causing real trouble here because our free
memory keeps hitting zero and then we swap-spiral.

What can I do to investigate this discrepancy?  Are there some tools
that I can use to debug the memory allocated in active to find out
where it's going, if not to resident process memory?

Thanks,
Luke

-- 
CTO, Hybrid Logic
+447791750420  |  +1-415-449-1165  | www.hybrid-cluster.com 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.2 - active plus inactive memory leak!?

2012-03-06 Thread RW
On Tue, 06 Mar 2012 18:30:07 -0500
Chuck Swiger wrote:

 On 3/6/2012 2:13 PM, Luke Marsden wrote:

 * Resident corresponds to a subset of the pages above: those
  pages which actually occupy physical/core memory.  Notably pages may
   appear in size but not appear in resident for read-only
  text pages from libraries which have not been used yet or which have
   been malloc()'d but not yet written-to.
 
 Yes.
 
  My understanding for the values for the system as a whole (at the
  top in 'top') is as follows:
 
 * Active / inactive memory is the same thing: resident
  memory from processes in use.  Being in the inactive as opposed to
  active list simply indicates that the pages in question are less
   recently used and therefore more likely to get swapped out
  if the machine comes under memory pressure.
 
 Well, they aren't exactly the same thing.  The kernel implements a VM
 working set algorithm which periodically looks at all of the pages
 that are in memory and notes whether a process has accessed that page
 recently.  If it has, the page is active; if the page has not been
 used for some time, it becomes inactive.

I think the previous poster  has it about right, it's mostly about
lifecycle. The inactive queue contains a mixture of resident and
non-resident memory. It's commonly dominated by disk cache pages, and
consequently is easily blown away by recursive greps etc.

 * Cache is freed memory which the kernel has decided to keep
  in case it correspond to a useful page in future; it can be cheaply
   evicted into the free list.
 
 Sort of, although this description fits the inactive memory
 category also.
 
 The major distinction is that the system is actively trying to flush
 any dirty pages in the cache category, so that they are available for
 reuse by something else immediately.

Only clean pages are added to cache. A dirty page will go twice around
the inactive queue as dirty, get flushed and then do a third pass as a
clean page. 

The point of cache is that it's a small stock of memory that's
available for immediate reuse, the pages have nothing else in common.



On Wed, 07 Mar 2012 00:36:21 +
Luke Marsden wrote:

 But that's what I'm saying...
 
 sum(process resident sizes) = active + inactive


Inactive memory contains disc cache. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Memory leak and swapfile

2010-11-27 Thread Matthew Seaman
On 26/11/2010 18:24, Jack Raats wrote:
 It looks like that there may be a memory leak of my swap space with one
 of the processes that is running.
 Big question: How can I determine which process is responsible.
 
 Any suggestions?

Look for a process with a really big SIZE in top(1) ?

Look for pages being mapped to swap via 'systat -vmstat 1'  Any activity
of the Swap Pager is a bad sign.

It's not so much 'swap space' as some process or processes using up
memory in general: when more memory has been allocated by processes than
will fit into RAM simultaneously, then you'll start getting pages mapped
to swap.  This is not intrinsically a bad thing: a one-time swap out of
a load of otherwise idle memory pages will clear space for more actively
used stuff.  It's generally very bad for performance if processes are
getting continually swapped in and out -- disk IO is pretty slow
compared to RAM.  Use eg. 'systat -vmstat 1' to monitor
swap activity.

It's not necessarily *one* process getting too big.  Processes that fork
multiple copies of themselves (like apache) can fill up RAM by spawning
too many copies of themselves.  In fact, it's a well known apache tuning
trick to limit the maximum number of apache child processes to what will
fit into RAM at one time -- swapping makes a far bigger impact on
performance than queueing up web requests until there's a free worker
process to service them.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Memory leak and swapfile

2010-11-26 Thread Jack Raats
It looks like that there may be a memory leak of my swap space with one of 
the processes that is running.

Big question: How can I determine which process is responsible.

Any suggestions?

Thanks
Jack 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


memory leak?

2010-08-23 Thread n dhert
After a reboot of my FreeBSD 8.0-p4 system
a vmstat shows:
Mon Aug 23 08:40:00 CEST 2010
 procs  memory  pagedisks faults cpu
 r b w avmfre   flt  re  pi  pofr  sr da0 pa0   in   sy   cs us
sy id
 1 1 0   1515M  7118M   816   5   5   0   726   0   0   0  138 2376 1740  1
2 97
My system had been allocated 8 Gb memory in a Vmware ESXi4 virtual machine.
avm = active virtual pages,  fre = size of free list
2525M + 7118M is 9600M  is this normal? (more than 8 Gb..)

six days ago is was:
Tue Aug 17 14:15:00 CEST 2010
 procs  memory  pagedisks faults cpu
 r b w avmfre   flt  re  pi  pofr  sr da0 pa0   in   sy   cs us
sy id
 3 1 0   2446M  1552M   628   0   0   0   621   6   0   0   30  939  572  1
1 98
but before the reboot it was
Mon Aug 23 06:45:00 CEST 2010
 procs  memory  pagedisks faults cpu
 r b w avmfre   flt  re  pi  pofr  sr da0 pa0   in   sy   cs us
sy id
 5 22 0   2260M   816M   489   0   0   0   478   2   0   0   27  957  580
1  198
avm + free adds up to only 3 Gb.
Where is the rest of the memory ??

Is there a memory leak, how to find what causes the memory leak?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: memory leak?

2010-08-23 Thread Ivan Voras
On 08/23/10 11:50, n dhert wrote:
 After a reboot of my FreeBSD 8.0-p4 system
 a vmstat shows:
 Mon Aug 23 08:40:00 CEST 2010
  procs  memory  pagedisks faults cpu
  r b w avmfre   flt  re  pi  pofr  sr da0 pa0   in   sy   cs us
 sy id
  1 1 0   1515M  7118M   816   5   5   0   726   0   0   0  138 2376 1740  1
 2 97
 My system had been allocated 8 Gb memory in a Vmware ESXi4 virtual machine.
 avm = active virtual pages,  fre = size of free list
 2525M + 7118M is 9600M  is this normal? (more than 8 Gb..)

See here, on a physical machine with 4 GB RAM:

 procs  memory  pagedisks faults cpu
 r b w avmfre   flt  re  pi  pofr  sr ad0 cd0   in   sy   cs
us sy id
 1 0 0   5571M  1254M30   0   0   029   0   0   08  519  522
 0  0 100

We have 5571+1254=6825 MB.

The catch is in the description - active *virtual* pages belonging to
processes - they do not have to correspond to physical RAM.

 six days ago is was:

  3 1 0   2446M  1552M   628   0   0   0   621   6   0   0   30  939  572  1

  5 22 0   2260M   816M   489   0   0   0   478   2   0   0   27  957  580

 avm + free adds up to only 3 Gb.

 Where is the rest of the memory ??

There are a lot other uses for memory. Try running top a couple of
time when you seem to detect the leak and add together the various
categories of memory.

 Is there a memory leak, how to find what causes the memory leak?

If indeed there is, which is not probable, you first need to discover is
it in a userland program or in kernel. If in kernel, use vmstat -m to
track usage over time and see if some category increases when it shouldn't.

Also, since you are running vmware, maybe you should try running
emulators/open-vm-tools and its vmmemctl driver - it could help if your
host is running out of memory.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Is this a kernel memory leak or a process memory leak?

2009-09-22 Thread Modulok
List,

Maybe I'm just not that bright, but I have a question regarding the following:

man 3 getenv
snip
Successive calls to setenv() or putenv() assigning a differently sized
value to the same name will result in a memory leak.  The FreeBSD seman-
tics for these functions (namely, that the contents of value are copied
and that old values remain accessible indefinitely) make this bug
unavoidable.  Future versions may eliminate one or both of these semantic
guarantees in order to fix the bug.
/snip

This is a memory leak within the process which calls sentenv() or
putenv(), not a memory leak in the kernel, right? Like, if I called
putenv() a in a loop and then exited the process, the kernel will
reclaim that cluster-fuck of lost allocated memory, right? (If it's a
kernel leak that would be super retarded as any process could
affectively starve the kernel of memory. ) So it's a userland leak
right?

Anybody?
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Is this a kernel memory leak or a process memory leak?

2009-09-22 Thread Giorgos Keramidas
On Tue, 22 Sep 2009 04:43:57 -0600, Modulok modu...@gmail.com wrote:
 Maybe I'm just not that bright, but I have a question regarding the following:

 man 3 getenv
 snip
 Successive calls to setenv() or putenv() assigning a differently sized
 value to the same name will result in a memory leak.  The FreeBSD seman-
 tics for these functions (namely, that the contents of value are copied
 and that old values remain accessible indefinitely) make this bug
 unavoidable.  Future versions may eliminate one or both of these semantic
 guarantees in order to fix the bug.
 /snip

 This is a memory leak within the process which calls sentenv() or
 putenv(), not a memory leak in the kernel, right?

Yes, it's a userland leak.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Memory leak with conky, anyone else?

2007-12-13 Thread Modulok
I get the feeling Conky 1.4.8 (the sysutil), or one of the libs it
links against, has a memory leak. I do not have any hard evidence yet
(like a patch to fix it), but the memory consumption slowly climbs to
what appears to be excessive. I did read the manual page about:

   Conky is generally very good on resources. However, certain objects  in
Conky  are  harder  on resources then othersIf  you  do use them,
please do not complain about memory or CPU usage, unless you think
something's seriously wrong...

I am using those features, but I still think something is seriously
wrong. The following is after running for 6.5 days:

top;
  PID USERNAME   THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
  791 Modulok  1  960   280M   278M select  42:37  0.00% conky

ps -u;
  USER  PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND
  Modulok   791  0.0 13.7 286708 284912  v0  SFri09AM  42:35.18 conky


Anyone else have similar issues?
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak with conky, anyone else?

2007-12-13 Thread Roland Smith
On Thu, Dec 13, 2007 at 09:56:25PM -0700, Modulok wrote:
 I get the feeling Conky 1.4.8 (the sysutil), or one of the libs it
 links against, has a memory leak. I do not have any hard evidence yet
 (like a patch to fix it), but the memory consumption slowly climbs to
 what appears to be excessive. I did read the manual page about:
 
Conky is generally very good on resources. However, certain objects  in
 Conky  are  harder  on resources then othersIf  you  do use them,
 please do not complain about memory or CPU usage, unless you think
 something's seriously wrong...
 
 I am using those features, but I still think something is seriously

How does your .conkyrc look?

 wrong. The following is after running for 6.5 days:
 
 top;
   PID USERNAME   THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
   791 Modulok  1  960   280M   278M select  42:37  0.00% conky

  41631 rsmith   1  440 27532K  5460K select  33:32  0.00% conky
 
 ps -u;
   USER  PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND
   Modulok   791  0.0 13.7 286708 284912  v0  SFri09AM  42:35.18 conky

 rsmith 41631  0.0  0.5 27532  5460  v0  S 3Dec07  33:31.68 conky -d

Fine here (FreeBSD 7.0-BETA3 amd64)

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpS8yGDS6VKd.pgp
Description: PGP signature


Re: Memory leak and deep swap upon the restart?

2007-03-15 Thread Dan Nelson
In the last episode (Mar 15), Abdullah Ibn Hamad Al-Marri said:
 Hello,
 
 I have a webmail server, has apache 2.2.4, mysql 5.0.33, php 5.2.1,
 clamav, mailscanner ..etc.
 
 The weird issue it goes into deep swap when it starts or I restart it. 
 *sigh*
 This happened since like 6 months I don't know why? it was okay before that.
 
 here is the top info
 
 last pid:   790;  load averages:  0.00,  0.06,  0.05 up 0+00:06:50  03:51:28
 69 processes:  1 running, 68 sleeping
 CPU states:  0.0% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.6% idle
 Mem: 323M Active, 91M Inact, 56M Wired, 27M Cache, 52M Buf, 988K Free
 Swap: 2048M Total, 104M Used, 1944M Free, 5% Inuse

Right now you're only showing 100M of swap being used; that looks fine,
as long as it's not being accessed constantly (watch for ##K in, ##K
out to appear on the Swap: line, or watch the pi and po columns of
vmstat 5).  If you see constant swap activity, that means you'll need
to reduce the number of worker processes for your multiprocess daemons
(from your ps output, that means apache, amavisd amd MailScanner), move
some processes to another machine, or add RAM.
 
 Here is the ps -aux output
 
 mail# ps -aux
 USER   PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND
 vscan  482  0.0  0.0 46472 0  ??  IW   - 0:00.00 amavisd 
 (virgin child) (perl5.8.8)
 vscan  483  0.0  0.0 46472 0  ??  IW   - 0:00.00 amavisd 
 (virgin child) (perl5.8.8)

You have a bunch of amavisd processes that are completely swapped out
(0 RSS) and have never consumed any CPU (TIME column).  This probably
means that you could safely reduce the number of worker processes since
they're never used.

Also, the MailScanner process is pretty big; maybe there are some
settings you can change to make it use less.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Memory leak and deep swap upon the restart?

2007-03-14 Thread Abdullah Ibn Hamad Al-Marri

Hello,

I have a webmail server, has apache 2.2.4, mysql 5.0.33, php 5.2.1,
clamav, mailscanner ..etc.

The weird issue it goes into deep swap when it starts or I restart it. *sigh*
This happened since like 6 months I don't know why? it was okay before that.

here is the top info

last pid:   790;  load averages:  0.00,  0.06,  0.05
up 0+00:06:50  03:51:28
69 processes:  1 running, 68 sleeping
CPU states:  0.0% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.6% idle
Mem: 323M Active, 91M Inact, 56M Wired, 27M Cache, 52M Buf, 988K Free
Swap: 2048M Total, 104M Used, 1944M Free, 5% Inuse



Here is the ps -aux output

mail# ps -aux
USER   PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND
root10 98.7  0.0 0 8  ??  RL3:45AM   5:55.48 [idle]
root 0  0.0  0.0 0 0  ??  WLs   3:45AM   0:00.00 [swapper]
root 1  0.0  0.0   820   140  ??  ILs   3:45AM   0:00.01 /sbin/init --
root 2  0.0  0.0 0 8  ??  DL3:45AM   0:00.02 [g_event]
root 3  0.0  0.0 0 8  ??  DL3:45AM   0:00.22 [g_up]
root 4  0.0  0.0 0 8  ??  DL3:45AM   0:00.17 [g_down]
root 5  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [thread taskq]
root 6  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [kqueue taskq]
root 7  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [acpi_task_0]
root 8  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [acpi_task_1]
root 9  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [acpi_task_2]
root11  0.0  0.0 0 8  ??  WL3:45AM   0:00.87 [swi4: clock]
root12  0.0  0.0 0 8  ??  WL3:45AM   0:00.00 [swi3: vm]
root13  0.0  0.0 0 8  ??  WL3:45AM   0:00.13 [swi1: net]
root14  0.0  0.0 0 8  ??  DL3:45AM   0:00.06 [yarrow]
root15  0.0  0.0 0 8  ??  WL3:45AM   0:00.00
[swi6: Giant taskq]
root16  0.0  0.0 0 8  ??  WL3:45AM   0:00.00
[swi6: task queue]
root17  0.0  0.0 0 8  ??  WL3:45AM   0:00.00 [swi5: +]
root18  0.0  0.0 0 8  ??  WL3:45AM   0:00.00 [irq20: acpi0]
root19  0.0  0.0 0 8  ??  WL3:45AM   0:00.19 [irq22: fxp0]
root20  0.0  0.0 0 8  ??  WL3:45AM   0:00.11 [irq14: ata0]
root21  0.0  0.0 0 8  ??  WL3:45AM   0:00.00 [irq15: ata1]
root22  0.0  0.0 0 8  ??  WL3:45AM   0:00.00 [irq1: atkbd0]
root23  0.0  0.0 0 8  ??  DL3:45AM   0:01.00 [pagedaemon]
root24  0.0  0.0 0 8  ??  DL3:45AM   0:00.78 [vmdaemon]
root25  0.0  0.0 0 8  ??  DL3:45AM   0:00.31 [pagezero]
root26  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [bufdaemon]
root27  0.0  0.0 0 8  ??  DL3:45AM   0:00.00 [vnlru]
root28  0.0  0.0 0 8  ??  DL3:45AM   0:00.03 [syncer]
root29  0.0  0.0 0 8  ??  DL3:45AM   0:00.01 [softdepflush]
root30  0.0  0.0 0 8  ??  DL3:45AM   0:00.02 [schedcpu]
root92  0.0  0.0  1364 0  ??  IWs  - 0:00.00 adjkerntz -i
root   344  0.0  0.1  1496   440  ??  Ss3:45AM   0:00.02
/usr/sbin/syslogd -ss -a /var/amavis/var/log
vscan  449  0.0  0.7 45840  3520  ??  Ss3:45AM   0:00.48
amavisd (master) (perl5.8.8)
postgrey   468  0.0  0.0  8800 0  ??  IWs  - 0:00.00
/usr/local/sbin/postgrey --pidfile=/var/run/postgrey.pid --inet=10
root   474  0.0 10.9 61788 56864  ??  Ss3:45AM   0:02.95
/usr/local/bin/spamd -c -Q -d -r /var/run/spamd/spamd.pid (perl5.8
vscan  482  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  483  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  484  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  485  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  486  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  487  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  488  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
vscan  489  0.0  0.0 46472 0  ??  IW   - 0:00.00
amavisd (virgin child) (perl5.8.8)
root   633  0.0  0.1  2444   412  ??  Ss3:45AM   0:00.01
/usr/local/libexec/postfix/master
postfix644  0.0  0.1  2476   416  ??  S 3:45AM   0:00.01
pickup -l -t fifo -u
postfix645  0.0  0.1  2524   480  ??  I 3:45AM   0:00.01 qmgr
-l -t fifo -u
root   646  0.0  0.7 61788  3428  ??  I 3:45AM   0:00.01 spamd
child (perl5.8.8)
root   647  0.0  0.3 61788  1424  ??  I 3:45AM   0:00.00 spamd
child (perl5.8.8)
postfix649  0.0  0.2 18916  1180  ??  Is

Re: Memory leak and deep swap upon the restart?

2007-03-14 Thread Kris Kennaway
On Thu, Mar 15, 2007 at 06:55:24AM +0300, Abdullah Ibn Hamad Al-Marri wrote:
 Hello,
 
 I have a webmail server, has apache 2.2.4, mysql 5.0.33, php 5.2.1,
 clamav, mailscanner ..etc.
 
 The weird issue it goes into deep swap when it starts or I restart it. 
 *sigh*
 This happened since like 6 months I don't know why? it was okay before that.

Your running processes are trying to use more memory than is present
in your system, so swapping is the only possibility.

Look at the VSZ column (virtual size) to see how overloaded your
system is.

 USER   PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND

 vscan  449  0.0  0.7 45840  3520  ??  Ss3:45AM   0:00.48
 amavisd (master) (perl5.8.8)
 root   474  0.0 10.9 61788 56864  ??  Ss3:45AM   0:02.95
 /usr/local/bin/spamd -c -Q -d -r /var/run/spamd/spamd.pid (perl5.8
 vscan  482  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  483  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  484  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  485  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  486  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  487  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  488  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 vscan  489  0.0  0.0 46472 0  ??  IW   - 0:00.00
 amavisd (virgin child) (perl5.8.8)
 root   646  0.0  0.7 61788  3428  ??  I 3:45AM   0:00.01 spamd
 child (perl5.8.8)
 root   647  0.0  0.3 61788  1424  ??  I 3:45AM   0:00.00 spamd
 child (perl5.8.8)
 postfix649  0.0  0.2 18916  1180  ??  Is3:45AM   0:00.01
 MailScanner: master waiting for children, sleeping (perl5.8.8)
 postfix650  0.0  0.5 79972  2464  ??  S 3:45AM   0:03.10
 MailScanner: waiting for messages (perl5.8.8)
 root   667  0.0  1.3 49788  6732  ??  Ss3:45AM   0:00.18
 /usr/local/sbin/httpd
 www742  0.0  0.0 49864 0  ??  IW   - 0:00.00
 /usr/local/sbin/httpd
 www763  0.0  1.3 50704  6980  ??  I 3:45AM   0:00.02
 /usr/local/sbin/httpd
 www765  0.0  2.0 52184 10140  ??  I 3:45AM   0:00.31
 /usr/local/sbin/httpd
 www766  0.0  0.7 49856  3476  ??  I 3:45AM   0:00.01
 /usr/local/sbin/httpd
 www767  0.0  0.7 49856  3476  ??  I 3:45AM   0:00.00
 /usr/local/sbin/httpd
 www768  0.0  0.7 49856  3476  ??  I 3:45AM   0:00.01
 /usr/local/sbin/httpd
 www769  0.0  2.1 50836 10788  ??  I 3:45AM   0:00.07
 /usr/local/sbin/httpd
 www770  0.0  2.3 50936 12172  ??  I 3:45AM   0:00.21
 /usr/local/sbin/httpd
 www771  0.0  0.0 49816 0  ??  IW   - 0:00.00
 /usr/local/sbin/httpd
 www772  0.0  0.0 49816 0  ??  IW   - 0:00.00
 /usr/local/sbin/httpd
 www773  0.0  0.0 49816 0  ??  IW   - 0:00.00
 /usr/local/sbin/httpd
 postfix774  0.0  0.3 79972  1600  ??  S 3:45AM   0:03.05
 MailScanner: waiting for messages (perl5.8.8)
 postfix775  0.0  0.3 79972  1792  ??  S 3:45AM   0:03.05
 MailScanner: waiting for messages (perl5.8.8)
 postfix776  0.0  0.3 79972  1376  ??  S 3:45AM   0:03.05
 MailScanner: waiting for messages (perl5.8.8)
 postfix777  0.0 14.4 79972 74812  ??  S 3:45AM   0:03.15
 MailScanner: waiting for messages (perl5.8.8)
 mysql  518  0.0  3.7 51508 19184 con- I 3:45AM   0:00.23
 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.c

Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to catch a memory leak?

2007-01-19 Thread Roger Olofsson

Dear Mailing List,

The application vlc (found in ports) when run on FBSD 5.x and 6.x 
behaves as if there's a memory leak somewhere hidden in it. This is 
appearing when starting vlc from shell playing a playlist and streaming 
video over udp to LAN like so:


vlc --loop playlist.m3u --sout 
'#transcode{acodec=mpga,ab=192}:std{access=udp,mux=,dst=239.255.255.255}'


The memory of the machine slowly gets eaten until the application ends 
with the message 'Killed' when the memory has run out.


I have adressed this on the vlc forum and I have begun glancing on the 
massive source code of this very complex application.


Kris Kennaway has pointed out that it is most likely an issue with threads.

My question is how do I track down a possible memory leak and would 
there be a tool to monitor (from outside the application) what process 
that allocates memory and how much?


Running it through gdb breaks it and attaching gdp to it while running 
breaks it.


Grateful for any pointers to get me in the right direction. Thanks In 
Advance.





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to catch a memory leak?

2007-01-19 Thread Chuck Swiger

On Jan 19, 2007, at 12:00 PM, Roger Olofsson wrote:
The application vlc (found in ports) when run on FBSD 5.x and 6.x  
behaves as if there's a memory leak somewhere hidden in it.

[ ... ]
My question is how do I track down a possible memory leak and would  
there be a tool to monitor (from outside the application) what  
process that allocates memory and how much?


Consider something like the valgrind port or dlmalloc.

--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Memory leak in PHP on FreeBSD

2006-08-30 Thread Tom Grove
I was reading http://www.bsdnews.com and ran across an article about a 
memory leak in php and mysql on FreeBSD.  This is fairly concerning 
considering I run quite a few servers with this setup.  I haven't been 
able to find much documentation regarding this subject.


It has been reported as a permanent hole which seems odd.  However, if 
there is a problem does anyone have any info?


-Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak in PHP on FreeBSD

2006-08-30 Thread Bill Moran
In response to Tom Grove [EMAIL PROTECTED]:

 I was reading http://www.bsdnews.com and ran across an article about a 
 memory leak in php and mysql on FreeBSD.  This is fairly concerning 
 considering I run quite a few servers with this setup.  I haven't been 
 able to find much documentation regarding this subject.
 
 It has been reported as a permanent hole which seems odd.  However, if 
 there is a problem does anyone have any info?

Anyone have Tayler's email address?  I understand that he doesn't want to
get caught in a OS Holy War, but he has to realize that the FreeBSD
community needs to know the specifics of the problem so it can be
fixed.  The email link on his site appears broken.

I just want contact information for the people who gave him the report
so I can get in touch with them for details.

We use PHP extensively, but not MySQL.  Personally, if the problem only
exists between PHP and MySQL, it's not a major concern with me.  If it
exists in PHP when MySQL isn't involved, it's a BIG deal ;)

-- 
Bill Moran
Collaborative Fusion Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak in PHP on FreeBSD

2006-08-30 Thread pete wright

On 8/30/06, Tom Grove [EMAIL PROTECTED] wrote:

I was reading http://www.bsdnews.com and ran across an article about a
memory leak in php and mysql on FreeBSD.  This is fairly concerning
considering I run quite a few servers with this setup.  I haven't been
able to find much documentation regarding this subject.

It has been reported as a permanent hole which seems odd.  However, if
there is a problem does anyone have any info?

-Tom



yea, i wouldn't really pay attention to this, from the article:

I'm just repeating what the server guys have told me. No, I don't
want your offer of technical help.

betting the admin's may have misunderstood something or misconfigured
something...

-pete

--
~~o0OO0o~~
Pete Wright
www.nycbug.org
NYC's *BSD User Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Erik Norgaard

Robert Leftwich wrote:

After running some number crunching for the last twelve hours I noticed
my box starting to use swap. Given that it has 4gb in it (of which 3gb
is available, see my other email for that issue) and I know that the app
never uses more than around 1gb I was surprised. Looking at the numbers
from top I was even more surprised, there seems to be a significant
chunk of memory unaccounted for (from memory when I checked after a
couple of hours the inactive memory was around 1300M with Free in the
400M range, everything basically totalling to around the 3gb mark as
expected). The app is driven by a script and is only running for around
1/2 hr per dataset after which it shuts down and restarts on a new
dataset, so all memory should be freed up/made inactive after each
restart, no? 


Mem: 274M Active, 227M Inact, 263M Wired, 95M Cache, 214M Buf, 4536K
Free
Swap: 4068M Total, 707M Used, 3361M Free, 17% Inuse

real memory  = 3221159936 (3071 MB)
avail memory = 3106529280 (2962 MB)

What's the best way to track down more information as to the cause of
this problem?


Do you run other applications also?

There was a discussion on CURRENT@ some weeks ago about a memory leak 
that turned out to be firefox with some extensions, updates are 
available now.


Cheers, Erik
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Robert Leftwich

On Mon, 13 Feb 2006 09:29:03 +0100, Erik Norgaard
[EMAIL PROTECTED] said:
 
 Do you run other applications also?
 
 There was a discussion on CURRENT@ some weeks ago about a memory leak 
 that turned out to be firefox with some extensions, updates are 
 available now.
 

Unfortunately no, its cli only, no x, pretty much just Postgres and
Python and C :-(

Robert
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread David Scheidt
On Mon, Feb 13, 2006 at 09:30:17PM +1100, Robert Leftwich wrote:
 From: Robert Leftwich [EMAIL PROTECTED]
 
 On Mon, 13 Feb 2006 09:29:03 +0100, Erik Norgaard
 [EMAIL PROTECTED] said:
  
  Do you run other applications also?
  
  There was a discussion on CURRENT@ some weeks ago about a memory leak 
  that turned out to be firefox with some extensions, updates are 
  available now.
  
 
 Unfortunately no, its cli only, no x, pretty much just Postgres and
 Python and C :-(

I've seen (very, very, very, very) large memory leaks on long-lived
Python processes.  I haven't looked at it to figure out if it's
python, some module, or the application doing something stupid.  But
the processes will grow until they hit their limits.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Charles Swiger

On Feb 13, 2006, at 4:40 PM, David Scheidt wrote:

Unfortunately no, its cli only, no x, pretty much just Postgres and
Python and C :-(


I've seen (very, very, very, very) large memory leaks on long-lived
Python processes.  I haven't looked at it to figure out if it's
python, some module, or the application doing something stupid.  But
the processes will grow until they hit their limits.


For contrast, I've got a Python-based daemon which handles 100K to 1  
million logfile lines a day and spits them into a processing/ 
reporting system using either XMLRPC or SOAP, and it stays up for  
months without leaking memory or changing in size.


As I said earlier, top -o size will identify the process(es) which  
is/are using excessive memory.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Robert Leftwich

On Mon, 13 Feb 2006 16:40:54 -0500, David Scheidt [EMAIL PROTECTED]
said:
 
 I've seen (very, very, very, very) large memory leaks on long-lived
 Python processes.  I haven't looked at it to figure out if it's
 python, some module, or the application doing something stupid.  But
 the processes will grow until they hit their limits.

What's your definition of long-lived? My scenario is that I'm processing
a particular dataset in Python which is launched by a shell script, once
finished (after 30-35mins) the Python app completes and the shell script
launches another instance on a new dataset. All memory allocated by the
finished Python app should be freed/made inactive shouldn't it?

Here's some more data:

After a reboot this is what top says:

Mem: 45M Active, 13M Inact, 61M Wired, 4K Cache, 60M Buf, 2842M Free
Swap: 4068M Total, 4068M Free

which totals 3021M

After 1 dataset it is:

Mem: 107M Active, 1919M Inact, 158M Wired, 16K Cache, 214M Buf, 570M
Free
Swap: 4068M Total, 4068M Free

which totals 2968M

While running on the 6th dataset:

Mem: 1032M Active, 1045M Inact, 260M Wired, 145M Cache, 214M Buf,
4664K Free
Swap: 4068M Total, 108K Used, 4068M Free

which totals 2700.6M

Are my assumptions incorrect, should the totals displayed by top be at
least approximately equal?

Robert



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Charles Swiger

On Feb 13, 2006, at 5:13 PM, Robert Leftwich wrote:

After 1 dataset it is:

Mem: 107M Active, 1919M Inact, 158M Wired, 16K Cache, 214M Buf,  
570M

Free
Swap: 4068M Total, 4068M Free

which totals 2968M

While running on the 6th dataset:

Mem: 1032M Active, 1045M Inact, 260M Wired, 145M Cache, 214M Buf,
4664K Free
Swap: 4068M Total, 108K Used, 4068M Free

which totals 2700.6M


Possibly your database is using lots of SysV shared memory, which  
would explain why wired is going up so much, otherwise perhaps  
something in the kernel is leaking.  sysctl kern.malloc might be  
interesting to consider.



Are my assumptions incorrect, should the totals displayed by top be at
least approximately equal?


Exclude the buf entry from your math, that will be closer.  You  
should be looking further down at the SIZE column to see which  
processes are using so much RAM...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Robert Leftwich

On Mon, 13 Feb 2006 17:58:07 -0500, Charles Swiger [EMAIL PROTECTED]
said:
 On Feb 13, 2006, at 5:13 PM, Robert Leftwich wrote:
 
 Possibly your database is using lots of SysV shared memory, which  
 would explain why wired is going up so much, otherwise perhaps  
 something in the kernel is leaking.  sysctl kern.malloc might be  
 interesting to consider.

What should I be looking for? 

The maximum MemUse is  devbuf  2039  8340K, the max InUse is  sysctloid 
3613   176K.

 
  Are my assumptions incorrect, should the totals displayed by top be at
  least approximately equal?
 
 Exclude the buf entry from your math, that will be closer.  You  
 should be looking further down at the SIZE column to see which  
 processes are using so much RAM...
 

I can't see anything that explains the discrepancy. Below is the top -o
size after a reboot, followed by the current top after 8 datasets (the
extra python process is the analysis app - at a low memory usage point):

(Note that the original 2 python processes are web servers and that I
have 3 postgres clusters running on different ports, pending a move to
separate machines - assuming I can solve this problem)

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
  COMMAND
  599 msf 1   40 75256K 25408K accept 1   0:00  0.00% python
  582 msf 1  760 53772K  5580K select 0   0:00  0.00%
  postgres
  575 msf 1  760 53748K  5288K select 0   0:00  0.00%
  postgres
  588 msf 1  760 53588K  5360K select 0   0:00  0.00%
  postgres
  574 msf 1  760 53564K  5060K select 0   0:00  0.00%
  postgres
  586 msf 1  760 52140K 14988K select 0   0:00  0.00% python
  601 root1   40 29388K  3944K sbwait 1   0:00  0.00% sshd
  604 msf 1  760 29364K  3996K select 1   0:00  0.00% sshd
  578 msf 1  760 29224K  5472K select 0   0:00  0.00%
  postgres
  576 msf 1  760 29216K  5372K select 0   0:00  0.00%
  postgres
  583 msf 1  760 20488K  5224K select 0   0:00  0.00%
  postgres
  589 msf 1  760 20488K  4988K select 0   0:00  0.00%
  postgres
  579 msf 1  760 20484K  5220K select 0   0:00  0.00%
  postgres
  580 msf 1  810 19548K  5284K select 1   0:00  0.00%
  postgres
  584 msf 1  770 19536K  5260K select 1   0:00  0.00%
  postgres
  590 msf 1  760 19512K  5012K select 1   0:00  0.00%
  postgres


  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
  COMMAND
 2256 msf 4  200 83228K 31876K kserel 1   0:01  0.00% python
 2257 msf 1   40 56340K 19836K sbwait 1   0:00  0.00%
 postgres
  582 msf 1  760 53920K 36916K select 0   0:11  0.00%
  postgres
  575 msf 1  760 53748K  3948K select 0   0:00  0.00%
  postgres
  588 msf 1  760 53708K 36704K select 0   0:03  0.00%
  postgres
  574 msf 1  760 53564K  3856K select 0   0:00  0.00%
  postgres
  586 msf 1  760 52140K 13912K select 0   0:00  0.00% python
 2641 root1   40 29388K  2876K sbwait 1   0:00  0.00% sshd
 2644 msf 1  760 29364K  2904K select 1   0:00  0.00% sshd
  578 msf 1  760 29224K  4140K select 0   0:02  0.00%
  postgres
  576 msf 1  760 29216K  4048K select 0   0:00  0.00%
  postgres
  583 msf 1  760 20488K  3940K select 0   0:00  0.00%
  postgres
  589 msf 1  760 20488K  3808K select 0   0:00  0.00%
  postgres
  579 msf 1  760 20484K  3896K select 0   0:00  0.00%
  postgres
  580 msf 1  810 19548K  3960K select 1   0:00  0.00%
  postgres
  584 msf 1  760 19536K  3936K select 1   0:00  0.00%
  postgres
  590 msf 1  760 19512K  3828K select 1   0:00  0.00%
  postgres

Robert
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-13 Thread Robert Leftwich

On Tue, 14 Feb 2006 11:00:46 +1100, Robert Leftwich
 
 I can't see anything that explains the discrepancy. Below is the top -o
 size after a reboot, followed by the current top after 8 datasets (the
 extra python process is the analysis app - at a low memory usage point):

Oops, just noticed that the analysis app was at a *really* low memory
usage point, i.e. it wasn't running at all, having spat the dummy on
some bad data! So there wasn't any extra python app.

Robert
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Memory leak?

2006-02-12 Thread Robert Leftwich
After running some number crunching for the last twelve hours I noticed
my box starting to use swap. Given that it has 4gb in it (of which 3gb
is available, see my other email for that issue) and I know that the app
never uses more than around 1gb I was surprised. Looking at the numbers
from top I was even more surprised, there seems to be a significant
chunk of memory unaccounted for (from memory when I checked after a
couple of hours the inactive memory was around 1300M with Free in the
400M range, everything basically totalling to around the 3gb mark as
expected). The app is driven by a script and is only running for around
1/2 hr per dataset after which it shuts down and restarts on a new
dataset, so all memory should be freed up/made inactive after each
restart, no? 

Mem: 274M Active, 227M Inact, 263M Wired, 95M Cache, 214M Buf, 4536K
Free
Swap: 4068M Total, 707M Used, 3361M Free, 17% Inuse

real memory  = 3221159936 (3071 MB)
avail memory = 3106529280 (2962 MB)

What's the best way to track down more information as to the cause of
this problem?

Thanks

Robert


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak?

2006-02-12 Thread Chuck Swiger
Robert Leftwich wrote:
[ ... ]
 Mem: 274M Active, 227M Inact, 263M Wired, 95M Cache, 214M Buf, 4536K
 Free
 Swap: 4068M Total, 707M Used, 3361M Free, 17% Inuse
 
 real memory  = 3221159936 (3071 MB)
 avail memory = 3106529280 (2962 MB)
 
 What's the best way to track down more information as to the cause of
 this problem?

Try top -o size...

-- 
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Apache error logs memory leak

2006-01-04 Thread Jose Borquez

I keep getting errors in my apache error logs with the following:
Is this a problem with PHP?

/usr/ports/textproc/php5-xml/work/php-5.1.1/ext/xml/xml.c(695) :  
Freeing 0x0882
B624 (32 bytes), 
script=/usr/local/www/groupoffice-com-2.14-FINAL-4/modules/phps

ysinfo/index.php
/usr/ports/lang/php5/work/php-5.1.1/Zend/zend_hash.c(169) : Actual 
location (loc

ation was relayed)
Last leak repeated 1 time
/usr/ports/textproc/php5-xml/work/php-5.1.1/ext/xml/xml.c(694) :  
Freeing 0x0882
3BE4 (16 bytes), 
script=/usr/local/www/groupoffice-com-2.14-FINAL-4/modules/phps

ysinfo/index.php
/usr/ports/lang/php5/work/php-5.1.1/Zend/zend_execute_API.c(462) :  
Freeing 0x08
823124 (16 bytes), 
script=/usr/local/www/groupoffice-com-2.14-FINAL-4/modules/ph

psysinfo/index.php
Last leak repeated 1 time
Zend/zend_language_scanner.c(4938) :  Freeing 0x088769E4 (1 bytes), 
script=/usr/

local/www/groupoffice-com-2.14-FINAL-4/modules/phpsysinfo/index.php
/usr/ports/lang/php5/work/php-5.1.1/Zend/zend_compile.c(3200) :  Freeing 
0x08876
9A4 (16 bytes), 
script=/usr/local/www/groupoffice-com-2.14-FINAL-4/modules/phpsy

sinfo/index.php
Last leak repeated 3 times
=== Total 2791 memory leaks detected ===

Thanks in advance,
Jose

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Top loses memory over time? Memory leak?

2004-12-22 Thread Tim
Okay, here's the background. I thought top was displaying my memory 
stats oddly, so I ran a little test. I rebooted the pc, logged into the 
console as a normal user, and ran top. I did this at around midnight 
last night / this morning. I let it run until I got home from work, 
(6:15 today) So that's about... 18 hours. Here are my results. First, 
when I started last night.

29 processes:  1 running, 28 sleeping
CPU states:  0.0% user,  0.0% nice,  0.2% system,  6.0% interrupt, 93.8% 
idle
Mem: 8120K Active, 8372K Inact, 17M Wired, 8576K Buf, 460M Free
Swap: 980M Total, 980M Free

Now, the one from when I got home:
25 processes:  1 running, 24 sleeping
CPU states:  0.0% user,  0.0% nice,  0.4% system,  8.9% interrupt, 90.7% 
idle
Mem: 7400K Active, 249M Inact, 68M Wired, 60M Buf, 170M Free
Swap: 980M Total, 980M Free

This machine sat unattended all day. What could be causing the drastic 
drop in Free memory? Is this normal? When I actually use the machine, 
it's even worse... Almost all of my RAM goes from Free to other various 
states, Mostly Inactive, even after I've closed all the programs I've 
had open, rather quickly (maybe an hour or two)

For reference, the uname -a:
FreeBSD Empathy 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Nov  7 21:38:11 
EST 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

(Dual processor, PIII 1.0ghz, 512M Ram)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Top loses memory over time? Memory leak?

2004-12-22 Thread Lowell Gilbert
Tim [EMAIL PROTECTED] writes:

 This machine sat unattended all day. What could be causing the drastic
 drop in Free memory? Is this normal? When I actually use the machine,
 it's even worse... Almost all of my RAM goes from Free to other
 various states, Mostly Inactive, even after I've closed all the
 programs I've had open, rather quickly (maybe an hour or two)

See the FAQ, but basically the answer is 
Free memory is wasted memory.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Memory leak in Perl?

2004-06-24 Thread Chris Miller

I'm running perl-threaded-5.8.4 from ports to support spf-milter

http://spf.pobox.com/sendmail-milter-INSTALL.txt

Perl seems to eat memory over a few hours and eventually dies. Most
spf-milter users report memory usage of ~25MB, but I've seen memory use in
excess of 110MB. I know there was a memory leak reported in Perl 5.8.2 but
I've found nothing on 5.8.4. Has anyone else experienced this with
threaded perl?

Regards,
Chris

Chris Miller
NetGate Internet
An iStrata Company
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


netscape memory leak

2004-05-21 Thread whitevamp
sorry if this quistion has allread been asked and awnsered..

i got noticeing that my system was runnung out of mem so i did top and this is what i 
found 

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

9936 dave -22 0 219M 98M RUN 16:03 46.04% 46.04% netscape-bin

15211 dave 31 0 2056K 964K RUN 0:08 3.37% 3.37% top

3 root -18 0 0K 0K psleep 4:08 2.93% 2.93% pagedaemon

99894 dave 2 0 21268K 2212K poll 79:20 1.90% 1.90% kdeinit

9941 dave 10 0 219M 98M nanslp 0:21 0.20% 0.20% netscape-bin

99870 dave 2 0 59268K 18568K select 63:32 0.00% 0.00% XFree86

netscape was takeing up 98 mem of ram si closed netscape and then did top agine and i 
found this 

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND

9936 dave -22 0 247M 102M swread 17:55 6.64% 6.64% netscape-bin

9941 dave 18 0 247M 102M pause 0:23 0.00% 0.00% netscape-bin

now it was takeing up 102 meg of ram

so  my quistion is this what would be causeing netscape to be useing up so much ram? 
and how do i fix it?



Netscape 7.1

Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

uname -a

FreeBSD vampextream.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 
2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386

thx in advance for any help any one can give me on this ..

David D.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 5/18/2004
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: netscape memory leak

2004-05-21 Thread Matthew Seaman
On Fri, May 21, 2004 at 12:38:49PM -0700, whitevamp wrote:
 sorry if this quistion has allread been asked and awnsered..
 
 i got noticeing that my system was runnung out of mem so i did top and this is what 
 i found 
 
 PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
 
 9936 dave -22 0 219M 98M RUN 16:03 46.04% 46.04% netscape-bin
 
 15211 dave 31 0 2056K 964K RUN 0:08 3.37% 3.37% top
 
 3 root -18 0 0K 0K psleep 4:08 2.93% 2.93% pagedaemon
 
 99894 dave 2 0 21268K 2212K poll 79:20 1.90% 1.90% kdeinit
 
 9941 dave 10 0 219M 98M nanslp 0:21 0.20% 0.20% netscape-bin
 
 99870 dave 2 0 59268K 18568K select 63:32 0.00% 0.00% XFree86
 
 netscape was takeing up 98 mem of ram si closed netscape and then did top agine and 
 i found this 
 
 PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
 
 9936 dave -22 0 247M 102M swread 17:55 6.64% 6.64% netscape-bin
 
 9941 dave 18 0 247M 102M pause 0:23 0.00% 0.00% netscape-bin
 
 now it was takeing up 102 meg of ram
 
 so  my quistion is this what would be causeing netscape to be useing up so much ram? 
 and how do i fix it?
 
 
 
 Netscape 7.1
 
 Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
 
 uname -a
 
 FreeBSD vampextream.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 
 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386
 
 thx in advance for any help any one can give me on this ..

Netscape and Mozilla and presumable some other related browsers have a
failure mode where either the on-screen windows freeze or disappear,
but the actual binary is left running in a catatonic state where it
just spins and takes up system resources but doesn't do anything
useful.  Generally I've seen this triggered by websites using Flash
animation and a few other data types which Netscape has to load a
plugin to deal with.  It can also sometimes leave some 'helper'
applications running in the same sort of disconnected state.

The only thing to do in those cases is kill all of the catatonic
processes, and learn to avoid the sites that cause the problems.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpmJfDSPcl0R.pgp
Description: PGP signature


Ethereal: memory leak?

2004-05-14 Thread Schizik
Hello everyone!

I have just noticed that ethereal eats a lot of memory.
Currently it has no capture running and no file loaded.
Previous analyzied file was about 56Mbytes. But it was
closed. Is this behavior normal?


Mem: 111M Active, 15M Inact, 46M Wired, 6820K Cache, 28M Buf, 564K Free
Swap: 384M Total, 331M Used, 53M Free, 86% Inuse

  PID USERNAME PRI NICE   SIZERES STATETIME   WCPUCPU COMMAND
 6201 lxxx 960   298M 92316K select   3:07  0.00%  0.00% ethereal


Cheers,
   Alex.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


memory 'leak' with 5.2.1?

2004-05-06 Thread Woon Wai Keen @ doubleukay.com
 That does seem excessive.  From my -CURRENT system (admittedly
 up less that 24 hours):

 Mem: 179M Active, 190M Inact, 93M Wired, 25M Cache, 60M Buf, 7044K
Indeed :\

After a reboot, it was great. The system became all responsive again, 
and it didn't swap anymore (applications were actually going into RAM 
and not into swap..). I have no idea at all why this behavior occured.

--
Regards,
wK (www.doubleukay.com)


smime.p7s
Description: S/MIME Cryptographic Signature


memory 'leak' with 5.2.1?

2004-05-05 Thread Woon Wai Keen @ doubleukay.com
Hi list,

I have been running 5.2.1 on a Celeron with 512MB RAM for nearly two 
months straight, but have been experiencing heavy swapping these past 
few days. In a last-ditch attempt, I stopped all the services hoping to 
reclaim the memory somehow.

The output from top (after stopping services) reads:

Mem: 12M Active, 10M Inact, 451M Wired, 1364K Cache, 59M Buf, 11M Free
Swap: 1024M Total, 15M Used, 1009M Free, 1% Inuse, 12K In
I noticed that the amount of 'wired' memory before and after stopping 
the services remains the same, at  400MB. The swap usage went down from 
~200MB to 15MB however.

Is it normal to have so much RAM 'wired'? (I don't really understand 
'wired' as described in the handbook)

--
Regards,
wK (www.doubleukay.com)


smime.p7s
Description: S/MIME Cryptographic Signature


memory 'leak' with 5.2.1?

2004-05-05 Thread Robert Huff

Woon Wai Keen @ doubleukay.com writes:
  The output from top (after stopping services) reads:
  
  Mem: 12M Active, 10M Inact, 451M Wired, 1364K Cache, 59M Buf, 11M Free
  Swap: 1024M Total, 15M Used, 1009M Free, 1% Inuse, 12K In
  
  I noticed that the amount of 'wired' memory before and after
  stopping the services remains the same, at  400MB. The swap
  usage went down from ~200MB to 15MB however.

That does seem excessive.  From my -CURRENT system (admittedly
up less that 24 hours):

Mem: 179M Active, 190M Inact, 93M Wired, 25M Cache, 60M Buf, 7044K Free


Robert Huff



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Tool for detecting memory leak in FreeBSD 4.8

2004-04-12 Thread jitendra pande
Hi ,
 
I didn't find any memory detection tool foir FreeBSD 4.8.
 
Any idea how can i detect memory leaks in freeBSD 4.8
 
Looking for an early reply.
 
Thanks
Jitendra


-
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tool for detecting memory leak in FreeBSD 4.8

2004-04-12 Thread Dan Nelson
In the last episode (Apr 12), jitendra pande said:
 I didn't find any memory detection tool foir FreeBSD 4.8.
  
 Any idea how can i detect memory leaks in freeBSD 4.8

dmalloc in ports (ports/devel/dmalloc) is very useful for catching
leaks.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak on 5.1-RELEASE?

2004-01-31 Thread Jorn Argelo
Are you sure that there isn't anything else running? Why don't  you give us
an ps -ax output? I don't think there's a memory leak in 5.1, since I've
seen running 5.1 just fine on a PE2650 with 2 GB RAM. You shouldn't
rely on top too much acually. Vmstat is a better program when looking
at memory.

Cheers,

Jorn
- Original Message -
From: dpk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 31, 2004 1:10 AM
Subject: Memory leak on 5.1-RELEASE?


 (I'm not a member of the list; please Cc me on any replies.)

 We're running Apache 1.3.28 on a 5.1-RELEASE machine. It's a Dell PE 2650
 w/ 2GB RAM. The site contains a lot of large files (multi-megabyte) -
 otherwise there's nothing unusual running.

 The Active memory use, according to top, seems rather high:

 last pid: 21487;  load averages:  0.19,  0.33,  0.32up 2+16:45:20
15:52:21
 76 processes:  1 running, 75 sleeping
 CPU states:  0.5% user,  0.0% nice,  4.0% system,  1.4% interrupt, 94.2%
idle
 Mem: 1413M Active, 187M Inact, 299M Wired, 93M Cache, 112M Buf, 2632K Free
 Swap: 1024M Total, 21M Used, 1003M Free, 2% Inuse

 We can't seem to get the Active number down much, even after stopping
 Apache it still stays around 1100M. There's no shared memory in use, and
 nothing in vmstat -m seems to indicate where the missing memory is. top,
 sorting by size, does not indicate anything unusual either.

 sysctl vm.vmtotal says:

 vm.vmtotal:
 System wide totals computed every five seconds: (values in kilobytes)
 ===
 Processes:  (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 76)
 Virtual Memory: (Total: 8172K, Active 636472K)
 Real Memory:(Total: 2051312K Active 389176K)
 Shared Virtual Memory:  (Total: 16436K Active: 11760K)
 Shared Real Memory: (Total: 6004K Active: 4436K)
 Free Memory Pages:  79228K

 whereas on other servers, the Real Memory Active number seems to match
 the one found in top, on this one it is about 1GB lower.

 A similar machine running Apache on 5.1-R, generally serving smaller
 files, has the same problem in a smaller scale (about 640M even when
 Apache is stopped).

 Are there any other data that I should send to help diagnose this problem,
 or any programs I can run to try and track this stray memory use down?

 - dpk
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak on 5.1-RELEASE?

2004-01-31 Thread dpk
 leak in 5.1, since I've
 seen running 5.1 just fine on a PE2650 with 2 GB RAM. You shouldn't
 rely on top too much acually. Vmstat is a better program when looking
 at memory.

 Cheers,

 Jorn
 - Original Message -
 From: dpk [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, January 31, 2004 1:10 AM
 Subject: Memory leak on 5.1-RELEASE?


  (I'm not a member of the list; please Cc me on any replies.)
 
  We're running Apache 1.3.28 on a 5.1-RELEASE machine. It's a Dell PE 2650
  w/ 2GB RAM. The site contains a lot of large files (multi-megabyte) -
  otherwise there's nothing unusual running.
 
  The Active memory use, according to top, seems rather high:
 
  last pid: 21487;  load averages:  0.19,  0.33,  0.32up 2+16:45:20
 15:52:21
  76 processes:  1 running, 75 sleeping
  CPU states:  0.5% user,  0.0% nice,  4.0% system,  1.4% interrupt, 94.2%
 idle
  Mem: 1413M Active, 187M Inact, 299M Wired, 93M Cache, 112M Buf, 2632K Free
  Swap: 1024M Total, 21M Used, 1003M Free, 2% Inuse
 
  We can't seem to get the Active number down much, even after stopping
  Apache it still stays around 1100M. There's no shared memory in use, and
  nothing in vmstat -m seems to indicate where the missing memory is. top,
  sorting by size, does not indicate anything unusual either.
 
  sysctl vm.vmtotal says:
 
  vm.vmtotal:
  System wide totals computed every five seconds: (values in kilobytes)
  ===
  Processes:  (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 76)
  Virtual Memory: (Total: 8172K, Active 636472K)
  Real Memory:(Total: 2051312K Active 389176K)
  Shared Virtual Memory:  (Total: 16436K Active: 11760K)
  Shared Real Memory: (Total: 6004K Active: 4436K)
  Free Memory Pages:  79228K
 
  whereas on other servers, the Real Memory Active number seems to match
  the one found in top, on this one it is about 1GB lower.
 
  A similar machine running Apache on 5.1-R, generally serving smaller
  files, has the same problem in a smaller scale (about 640M even when
  Apache is stopped).
 
  Are there any other data that I should send to help diagnose this problem,
  or any programs I can run to try and track this stray memory use down?
 
  - dpk
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Memory leak on 5.1-RELEASE?

2004-01-31 Thread Jorn Argelo
/bin/httpd -f
 /usr/local/www/server/conf/ht 56897  ??  S  0:00.02
 /usr/local/bin/httpd -f /usr/local/www/server/conf/ht 56898  ??  S 
 0:00.03 /usr/local/bin/httpd -f /usr/local/www/server/conf/ht 56900  ??  S 
 0:00.03 /usr/local/bin/httpd -f /usr/local/www/server/conf/ht 56577  p0
  Ss 0:00.02 -sh (sh)
 56904  p0  R+ 0:00.00 ps -ax
  3574  v0  Is+0:00.00 /usr/libexec/getty Pc ttyv0
   868  v1  Is+0:00.00 /usr/libexec/getty Pc ttyv1
   869  v2  Is+0:00.00 /usr/libexec/getty Pc ttyv2
   870  v3  Is+0:00.00 /usr/libexec/getty Pc ttyv3
   871  v4  Is+0:00.00 /usr/libexec/getty Pc ttyv4
   872  v5  Is+0:00.00 /usr/libexec/getty Pc ttyv5
   873  v6  Is+0:00.00 /usr/libexec/getty Pc ttyv6
   874  v7  Is+0:00.00 /usr/libexec/getty Pc ttyv7
   520 con- I  0:02.81 /usr/local/sbin/snmpd
   534 con- I  0:00.01 /bin/sh /usr/local/bin/mysqld_safe
 --datadir=/usr/loc 566 con- S138:26.09 /usr/local/libexec/mysqld
 --basedir=/usr/local --data

 According to top and ps, mysql is only using around 59M VSZ.

 On Sun, 1 Feb 2004, Jorn Argelo wrote:
  Are you sure that there isn't anything else running? Why don't  you give
  us an ps -ax output? I don't think there's a memory leak in 5.1, since
  I've seen running 5.1 just fine on a PE2650 with 2 GB RAM. You shouldn't
  rely on top too much acually. Vmstat is a better program when looking at
  memory.
 
  Cheers,
 
  Jorn
  - Original Message -
  From: dpk [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Saturday, January 31, 2004 1:10 AM
  Subject: Memory leak on 5.1-RELEASE?
 
   (I'm not a member of the list; please Cc me on any replies.)
  
   We're running Apache 1.3.28 on a 5.1-RELEASE machine. It's a Dell PE
   2650 w/ 2GB RAM. The site contains a lot of large files
   (multi-megabyte) - otherwise there's nothing unusual running.
  
   The Active memory use, according to top, seems rather high:
  
   last pid: 21487;  load averages:  0.19,  0.33,  0.32up 2+16:45:20
 
  15:52:21
 
   76 processes:  1 running, 75 sleeping
   CPU states:  0.5% user,  0.0% nice,  4.0% system,  1.4% interrupt,
   94.2%
 
  idle
 
   Mem: 1413M Active, 187M Inact, 299M Wired, 93M Cache, 112M Buf, 2632K
   Free Swap: 1024M Total, 21M Used, 1003M Free, 2% Inuse
  
   We can't seem to get the Active number down much, even after stopping
   Apache it still stays around 1100M. There's no shared memory in use,
   and nothing in vmstat -m seems to indicate where the missing memory
   is. top, sorting by size, does not indicate anything unusual either.
  
   sysctl vm.vmtotal says:
  
   vm.vmtotal:
   System wide totals computed every five seconds: (values in kilobytes)
   ===
   Processes:  (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 76)
   Virtual Memory: (Total: 8172K, Active 636472K)
   Real Memory:(Total: 2051312K Active 389176K)
   Shared Virtual Memory:  (Total: 16436K Active: 11760K)
   Shared Real Memory: (Total: 6004K Active: 4436K)
   Free Memory Pages:  79228K
  
   whereas on other servers, the Real Memory Active number seems to
   match the one found in top, on this one it is about 1GB lower.
  
   A similar machine running Apache on 5.1-R, generally serving smaller
   files, has the same problem in a smaller scale (about 640M even when
   Apache is stopped).
  
   Are there any other data that I should send to help diagnose this
   problem, or any programs I can run to try and track this stray memory
   use down?
  
   - dpk
   ___
   [EMAIL PROTECTED] mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-questions
   To unsubscribe, send any mail to
 
  [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Memory leak on 5.1-RELEASE?

2004-01-30 Thread dpk
(I'm not a member of the list; please Cc me on any replies.)

We're running Apache 1.3.28 on a 5.1-RELEASE machine. It's a Dell PE 2650
w/ 2GB RAM. The site contains a lot of large files (multi-megabyte) -
otherwise there's nothing unusual running.

The Active memory use, according to top, seems rather high:

last pid: 21487;  load averages:  0.19,  0.33,  0.32up 2+16:45:20  15:52:21
76 processes:  1 running, 75 sleeping
CPU states:  0.5% user,  0.0% nice,  4.0% system,  1.4% interrupt, 94.2% idle
Mem: 1413M Active, 187M Inact, 299M Wired, 93M Cache, 112M Buf, 2632K Free
Swap: 1024M Total, 21M Used, 1003M Free, 2% Inuse

We can't seem to get the Active number down much, even after stopping
Apache it still stays around 1100M. There's no shared memory in use, and
nothing in vmstat -m seems to indicate where the missing memory is. top,
sorting by size, does not indicate anything unusual either.

sysctl vm.vmtotal says:

vm.vmtotal:
System wide totals computed every five seconds: (values in kilobytes)
===
Processes:  (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 76)
Virtual Memory: (Total: 8172K, Active 636472K)
Real Memory:(Total: 2051312K Active 389176K)
Shared Virtual Memory:  (Total: 16436K Active: 11760K)
Shared Real Memory: (Total: 6004K Active: 4436K)
Free Memory Pages:  79228K

whereas on other servers, the Real Memory Active number seems to match
the one found in top, on this one it is about 1GB lower.

A similar machine running Apache on 5.1-R, generally serving smaller
files, has the same problem in a smaller scale (about 640M even when
Apache is stopped).

Are there any other data that I should send to help diagnose this problem,
or any programs I can run to try and track this stray memory use down?

- dpk
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


memory leak problem

2003-02-12 Thread Sam Izzo
Hi,

Woops, sorry about my other asdf spam email.. :-)

This might be a stupid/obvious question but dmalloc is reporting that I have
a memory leak in the following (test) program and I don't know why:

#include stdio.h
#include stdlib.h
#include dmalloc.h

int main(int argc, char **argv)
{
   char *c = malloc(10);
   strcpy(c, hello);
   printf(c=%s\n, c);
   free(c);
   return 1;
}

dmalloc is installed in my account and I compiled it with:

gcc -g test.c -o test /home/izzo/usr/lib/libdmalloc.a -I/home/izzo/usr/include

I set dmalloc up with:

dmalloc -i 200 -l dmlog high

and at the end of my log file (snipped for brevity) is:

1045066226: 3:  total-size  count in-use-size  count  source
1045066226: 3:4096  14096  1  ra=0x280e57ec
1045066226: 3:  10  1   0  0  test.c:7
1045066226: 3:4106  24096  1  Total of 2
1045066226: 3: dumping not-freed pointers changed since 0:
1045066226: 3:  not freed: '0x808f008|s1' (4096 bytes) from 'ra=0x280e57ec'
1045066226: 3:  total-size  count  source
1045066226: 3:4096  1  ra=0x280e57ec
1045066226: 3:4096  1  Total of 1
1045066226: 3:  unknown memory: 1 pointer, 4096 bytes

Supposedly there is a 4096 byte memory leak.  The same program on my Slackware
Linux box reports no leaks.  I'm using 4.7-RELEASE. Does anyone have any ideas?
The same program on a friend's 4.5-RELEASE box reports a 1024 byte leak. Is
dmalloc just not FreeBSD-friendly?

Thanks
sam


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message