🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by Brian Mon, 01 Dec 1997 00:00
syslog cpu hogging
#23835
Author: Brian
Date: Mon, 01 Dec 1997 00:00
29 lines
1721 bytes

On our news server I notice that syslogd generally takes up about 10-15%
of cputime.  This is quite a bit.

I have symlinked "/var/log/news/news","/var/log/news/gfilter.log", and
"/var/log/messages" to /dev/null to try and not only eliminate file
maintenance on these directories, but reduce syslog writing to disk.

Is there anything else that can be done to speedup syslog and reduce the
amount of cputime it eats?  Is there a way to tell INN not to write to
/var/log/news/news?  If I disable any logging in gfilter and inn of "per
aticle" logs, I think that would help alot, still keeping the informative
information such as whats in news.notice.

Brian


/-------------------------- signal@shreve.net -----------------------------\
| Brian Feeny                | USR TC Hubs | ShreveNet Inc. (318)222-2638  |
| Systems Administrator      | Perl, Linux | Web hosting, online stores,   |
| ShreveNet Inc.             |  USR Pilot  | Dial-Up 14.4-56k, ISDN & LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-| http://www.shreve.net/        |
| mods/Homepage coming soon  |LordSignal/SN| Quake server: 208.206.76.3    |
\-------------------------- 318-222-2638 x109 -----------------------------/



Re: syslog cpu hogging
#23817
Author: Ray Rocker
Date: Mon, 01 Dec 1997 00:00
31 lines
1724 bytes
In article <Pine.LNX.3.96.971201215535.29021A-100000@mercury.shreve.net>,
Brian   <signal@shreve.net> wrote:
>
>On our news server I notice that syslogd generally takes up about 10-15%
>of cputime.  This is quite a bit.

Are you running ncmspool by any chance? After installing ncmspool I found
that it became hopelessly backlogged in a matter of hours, and system
load seemed awfully high. I saw that syslogd was the culprit. Then I 
noticed that /var/adm/messages had become immense with stuff like 

innd: c:<966942555339.9513600166@whatever.com>

This is INN logging raw control commands, and ncmspool does a LOT of that!
My quick fix was to set syslog.conf to log news.info (which is what I
have L_CC_CMD set to) to /dev/null. syslogd now eats 1-2% of the CPU.

The ncmspool README says to be sure to set LOG_CANCEL_COMMANDS to DONT,
which you certainly want to do, but it doesn't solve this problem.
The offending syslog in cc.c:CCreader() is not inside any #ifdefs.

Also, c-nocem doesn't have this problem since it manipulates the
history file itself instead of sending control cancel commands.

--
Ray Rocker
rocker@datasync.com


Re: syslog cpu hogging
#23859
Author: Jeff Fisher
Date: Tue, 02 Dec 1997 00:00
35 lines
1967 bytes
On Mon, 1 Dec 1997 22:00:02 -0600, Brian
     <signal@shreve.net> said:
> 
> On our news server I notice that syslogd generally takes up about 10-15%
> of cputime.  This is quite a bit.
> 
> I have symlinked "/var/log/news/news","/var/log/news/gfilter.log", and
> "/var/log/messages" to /dev/null to try and not only eliminate file
> maintenance on these directories, but reduce syslog writing to disk.

What you may want to do is to include news.none on the line for 
/var/log/messages.  For example:
*.notice;mail.none;news.none		/var/log/messages
*.info;mail.non;news.none		/dev/console

This should reduce the amount of cpu syslogd is taking up.  You're 
risking a bit much if you don't have /var/log/messages.
Setting LOG_CANCELS? to DONT should help some (but probably not much).

> Is there anything else that can be done to speedup syslog and reduce the
> amount of cputime it eats?  Is there a way to tell INN not to write to
> /var/log/news/news? 

The /var/log/news/news file is written directly by inn, and will not cause
syslogd cpu usage to increase. It shouldn't cause a big change in inn's 
cpu usage either, since it's buffered.


-- 
Jeff Fisher                       | Nobody expects the Spanish
UNIX Sys Admin - IES Industries   | Inquisition.
http://opus.ies-energy.com/jeff/  |        - Cardinal Ximinez

Re: syslog cpu hogging
#23861
Author: Marc Slemko
Date: Tue, 02 Dec 1997 00:00
38 lines
2075 bytes
In <Pine.LNX.3.96.971201215535.29021A-100000@mercury.shreve.net> Brian  <signal@shreve.net> writes:


>On our news server I notice that syslogd generally takes up about 10-15%
>of cputime.  This is quite a bit.

What platform?  Do a ktrace/ptrace/strace/truss/etc. to trace the 
system calls and see if it is doing something stupid.

>I have symlinked "/var/log/news/news","/var/log/news/gfilter.log", and
>"/var/log/messages" to /dev/null to try and not only eliminate file
>maintenance on these directories, but reduce syslog writing to disk.

If you don't want something syslog logs to (ie. stuff like /var/log/messages)
then remove it from syslog instead of logging it and discarding it.

Be sure you aren't logging things multiple times, etc.  Go over your 
syslog.conf.

On some systems, syslog does horrible nasty things but the 
ktrace or equiv. for your platform should show you if it is
doing that.

Example from my (FreeBSD 2.x) box:

root        97  0.0  0.3   216  240  ??  Ss   Mon11PM   22:11.56 syslogd
news      2948 11.8 21.3 35588 20504  ??  Ss   Thu08PM  1346:32.91 /usr/local/news/cnfs/bin/innd -p4 -i0

syslogd has been running for a week and used 22 minutes.  innd has 
been running for 4 days and used 1436 minutes.  syslogd never
uses any significant CPU; disk bandwidth is a different matter, but
it is always harder to measure.

That's what I want for xmas.  A version of top that will rank 
processes in terms of disk IO by disk.

Re: syslog cpu hogging
#23866
Author: Michael Shields
Date: Tue, 02 Dec 1997 00:00
18 lines
1282 bytes
In article <Pine.LNX.3.96.971201215535.29021A-100000@mercury.shreve.net>,
Brian  <signal@shreve.net> wrote:
> On our news server I notice that syslogd generally takes up about 10-15%
> of cputime.  This is quite a bit.

You don't mention which OS.

I'm guessing that it's systime that's being used.  If your system is
like mine, and of course not everyone's is, syslogd will fsync() by
default and you should prepend a `-' to the logfile name in
syslogd.conf to tell it not to.  That took care of it for me.

(I run Debian Linux.)
-- 
Shields, CrossLink.

Re: syslog cpu hogging
#23891
Author: Brian
Date: Tue, 02 Dec 1997 00:00
37 lines
1909 bytes
Ray Rocker wrote:
> 
> In article <Pine.LNX.3.96.971201215535.29021A-100000@mercury.shreve.net>,
> Brian   <signal@shreve.net> wrote:
> >
> >On our news server I notice that syslogd generally takes up about 10-15%
> >of cputime.  This is quite a bit.
> 
> Are you running ncmspool by any chance? After installing ncmspool I found
> that it became hopelessly backlogged in a matter of hours, and system
> load seemed awfully high. I saw that syslogd was the culprit. Then I
> noticed that /var/adm/messages had become immense with stuff like
> 


Yes we run Nocemspool.  We have /var/log/messages linked to /dev/null
though.  Iwill try it via news.info and in syslog.conf.  Do you find
c-nocem to be better than nocem spool?

-- 
/-------------------------- signal@shreve.net
-----------------------------\
| Brian Feeny                | USR TC Hubs | ShreveNet Inc.
(318)222-2638  |
| Systems Administrator      | Perl, Linux | Web hosting, online
stores,   |
| ShreveNet Inc.             |  USR Pilot  | Dial-Up 14.4-56k, ISDN &
LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-|
http://www.shreve.net/        |
| mods/Homepage coming soon  |LordSignal/SN| Quake server:
208.206.76.3    |
\-------------------------- 318-222-2638 x109
-----------------------------/

Re: syslog cpu hogging
#23895
Author: Brian
Date: Tue, 02 Dec 1997 00:00
46 lines
1939 bytes
Michael Shields wrote:
> 
> In article <Pine.LNX.3.96.971201215535.29021A-100000@mercury.shreve.net>,
> Brian  <signal@shreve.net> wrote:
> > On our news server I notice that syslogd generally takes up about 10-15%
> > of cputime.  This is quite a bit.
> 
> You don't mention which OS.
> 
> I'm guessing that it's systime that's being used.  If your system is
> like mine, and of course not everyone's is, syslogd will fsync() by
> default and you should prepend a `-' to the logfile name in
> syslogd.conf to tell it not to.  That took care of it for me.
> 
> (I run Debian Linux.)


I am running Linux as well.  so your saying something like this:

*.info, news.none			-/var/log/messages

???

Brian

> --
> Shields, CrossLink.

-- 
/-------------------------- signal@shreve.net
-----------------------------\
| Brian Feeny                | USR TC Hubs | ShreveNet Inc.
(318)222-2638  |
| Systems Administrator      | Perl, Linux | Web hosting, online
stores,   |
| ShreveNet Inc.             |  USR Pilot  | Dial-Up 14.4-56k, ISDN &
LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-|
http://www.shreve.net/        |
| mods/Homepage coming soon  |LordSignal/SN| Quake server:
208.206.76.3    |
\-------------------------- 318-222-2638 x109
-----------------------------/

Re: syslog cpu hogging
#23897
Author: Brian
Date: Tue, 02 Dec 1997 00:00
40 lines
1914 bytes
Joe Greco wrote:
> 
> In news.software.nntp article <6605ja$s7r@osh1.datasync.com>, rocker@datasync.com (Ray Rocker) wrote:
> :This is INN logging raw control commands, and ncmspool does a LOT of that!
> :My quick fix was to set syslog.conf to log news.info (which is what I
> :have L_CC_CMD set to) to /dev/null. syslogd now eats 1-2% of the CPU.
> 
> Eh, why not simply NOT log news.info to anything?
> 
> Saves you the overhead of write() calls to discard data.  Simply discarding
> it is cheaper and easier.
> 

Well, I had *.info going to messages.  I added news.none as per someone
on this list to the line for /var/log/messages, I suppose this should
take care of it.....

Brian


> ... JG

-- 
/-------------------------- signal@shreve.net
-----------------------------\
| Brian Feeny                | USR TC Hubs | ShreveNet Inc.
(318)222-2638  |
| Systems Administrator      | Perl, Linux | Web hosting, online
stores,   |
| ShreveNet Inc.             |  USR Pilot  | Dial-Up 14.4-56k, ISDN &
LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-|
http://www.shreve.net/        |
| mods/Homepage coming soon  |LordSignal/SN| Quake server:
208.206.76.3    |
\-------------------------- 318-222-2638 x109
-----------------------------/

Re: syslog cpu hogging
#23909
Author: Joe Greco
Date: Tue, 02 Dec 1997 00:00
14 lines
1135 bytes
In news.software.nntp article <6605ja$s7r@osh1.datasync.com>, rocker@datasync.com (Ray Rocker) wrote:
:This is INN logging raw control commands, and ncmspool does a LOT of that!
:My quick fix was to set syslog.conf to log news.info (which is what I
:have L_CC_CMD set to) to /dev/null. syslogd now eats 1-2% of the CPU.

Eh, why not simply NOT log news.info to anything?

Saves you the overhead of write() calls to discard data.  Simply discarding
it is cheaper and easier.

... JG

Re: syslog cpu hogging
#23924
Author: Michael Shields
Date: Wed, 03 Dec 1997 00:00
13 lines
1147 bytes
In article <3484A8ED.798@shreve.net>, Brian <signal@shreve.net> wrote:
> I am running Linux as well.  so your saying something like this:
> 
> *.info, news.none			-/var/log/messages

Yes.  And I have to say this twice because you emailed me with no
indication that you were also posting to Usenet.  Despite my
Mail-Copies-To: header.
-- 
Shields, CrossLink.

Re: syslog cpu hogging
#23943
Author: Michael Shields
Date: Wed, 03 Dec 1997 00:00
10 lines
1014 bytes
In article <34870571.1066588@news.fr.bosch.de>,
peter@odin.stuttgart.netsurf.de (Peter Ahlert) wrote:
> *.info, news.none			/var/log/messages-

No.
-- 
Shields, CrossLink.

Re: syslog cpu hogging
#23958
Author: Brian
Date: Wed, 03 Dec 1997 00:00
65 lines
2309 bytes
Peter Ahlert wrote:
> 
> On Tue, 02 Dec 1997 18:33:49 -0600, Brian <signal@shreve.net> wrote:
> 
> >I am running Linux as well.  so your saying something like this:
> >
> >*.info, news.none                      -/var/log/messages
> 
> *.info, news.none                       /var/log/messages-
> 
> --
> Peter Ahlert    peter@odin.stuttgart.netsurf.de

From syslog.conf(5)

   Regular File
       Typically  messages  are  logged  to real files. The file has to
be
       specified with full pathname, beginning with a slash ``/''.

       You may prefix each entry with the minus ``-'' sign to omit
syncing
       the  file after every logging. Note that you might lose
information
       if the system crashes right behind a  write  attempt. 
Nevertheless
       this  might  give  you back some performance, especially if you
run
       programs that use logging in a very verbose manner.

to me this would mean:

*.info, news.none			-/var/log/messages

and it seems to be working with no errors.












-- 
/-------------------------- signal@shreve.net
-----------------------------\
| Brian Feeny                | USR TC Hubs | ShreveNet Inc.
(318)222-2638  |
| Systems Administrator      | Perl, Linux | Web hosting, online
stores,   |
| ShreveNet Inc.             |  USR Pilot  | Dial-Up 14.4-56k, ISDN &
LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-|
http://www.shreve.net/        |
| mods/Homepage coming soon  |LordSignal/SN| Quake server:
208.206.76.3    |
\-------------------------- 318-222-2638 x109
-----------------------------/

Re: syslog cpu hogging
#23976
Author: Peter Ahlert
Date: Wed, 03 Dec 1997 00:00
15 lines
946 bytes
On Tue, 02 Dec 1997 18:33:49 -0600, Brian <signal@shreve.net> wrote:

>I am running Linux as well.  so your saying something like this:
>
>*.info, news.none			-/var/log/messages

*.info, news.none			/var/log/messages-

--
Peter Ahlert    peter@odin.stuttgart.netsurf.de



Re: syslog cpu hogging
#24007
Author: Peter Ahlert
Date: Thu, 04 Dec 1997 00:00
22 lines
1213 bytes
On Wed, 03 Dec 1997 08:38:17 -0600, Brian <signal@shreve.net> wrote:

>*.info, news.none			-/var/log/messages
>
>and it seems to be working with no errors.

of course you are right! Sorry!

Someone in the early days of linux had a different idea of
implementing the nosync thing. And now I see, why my syslogd is using
so much of my cpu time after upgrading from a stoneage syslog package
to a recent one ;-)

Peter

--
Peter Ahlert    peter@odin.stuttgart.netsurf.de



Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads