[prev in list] [next in list] [prev in thread] [next in thread] 

List:       syslog-ng
Subject:    Re: [syslog-ng] RE: Re: syslog-ng 2.0rc1 memory usage (Balazs
From:       Balazs Scheidler <bazsi () balabit ! hu>
Date:       2006-08-09 8:00:02
Message-ID: 1155110402.6312.14.camel () bzorp ! balabit
[Download RAW message or body]

On Tue, 2006-08-08 at 15:56 -0500, Martin, David M wrote:
> applied the patch and resident size increased only marginally over a 10 minute
> period.  much better.
> ran through valgrind another 10 minutes, here's the report.

Only one definitely lost record was present, which should be fixed by
the patch below. Some of the remaining leaks seem to be part of buffered
messages not yet sent to destinations, but they were still reachable.

Some reload tests would be appreciated (e.g. run syslog-ng and reload it
a couple of times with your configuration and load), that might reveal
some real leaks.

--- orig/src/messages.c
+++ mod/src/messages.c
@@ -53,10 +53,12 @@ msg_send_internal_message(int prio, cons
     {
       LogMessage *m;

-      g_snprintf(buf, sizeof(buf), "<%d> syslog-ng[%d]: %s\n", prio, getpid(), msg);
-      m = log_msg_new(buf, strlen(buf), NULL, LP_INTERNAL | LP_LOCAL, NULL);
       if (G_LIKELY(internal_msg_queue))
-        g_queue_push_tail(internal_msg_queue, m);
+        {
+          g_snprintf(buf, sizeof(buf), "<%d> syslog-ng[%d]: %s\n", prio, getpid(), msg);
+          m = log_msg_new(buf, strlen(buf), NULL, LP_INTERNAL | LP_LOCAL, NULL);
+          g_queue_push_tail(internal_msg_queue, m);
+        }
     }
 }





-- 
Bazsi

_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic