• Idle CPU usage

    From Alterego@VERT/ALTERANT to Digital Man on Monday, December 16, 2019 10:14:32
    Howdy,

    I am planning on moving my SBBS to a low powered PC - but then I noticed it takes around 5-8%% CPU on it constantly - even while there is nobody on, and no mail transferring.

    On this (old) system - with much faster CPUs it takes 2-3% constantly (which probably wouldnt normally be a problem to most).

    I'm wondering why its taking up so much CPU, and if there is something I can do to reduce it? (ie: smtp/nginx uses negligble CPU while waiting for work.)

    I've disabled a few services that I dont use, like web/ftp, etc with no real difference in CPU usage.

    An strace, shows it doing this iteratively:
    [pid 850] <... nanosleep resumed> NULL) = 0
    [pid 850] select(21, [20], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 850] select(21, [20], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 850] nanosleep({0, 5000000}, <unfinished ...>
    [pid 18352] <... nanosleep resumed> NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, <unfinished ...>
    [pid 850] <... nanosleep resumed> NULL) = 0

    Are their ways to reduce this?
    ...deon


    ... If you've seen one city slum, you've seen them all.

    ---
    Synchronet Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to Alterego on Sunday, December 15, 2019 15:22:48
    Re: Idle CPU usage
    By: Alterego to Digital Man on Mon Dec 16 2019 10:14 am

    Howdy,

    I am planning on moving my SBBS to a low powered PC - but then I noticed it takes around 5-8%% CPU on it constantly - even while there is nobody on, and no mail transferring.

    On this (old) system - with much faster CPUs it takes 2-3% constantly (which probably wouldnt normally be a problem to most).

    I'm wondering why its taking up so much CPU, and if there is something I can do to reduce it? (ie: smtp/nginx uses negligble CPU while waiting for work.)

    I've disabled a few services that I dont use, like web/ftp, etc with no real difference in CPU usage.

    An strace, shows it doing this iteratively:
    [pid 850] <... nanosleep resumed> NULL) = 0
    [pid 850] select(21, [20], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 850] select(21, [20], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 850] nanosleep({0, 5000000}, <unfinished ...>
    [pid 18352] <... nanosleep resumed> NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, NULL) = 0
    [pid 18352] ioctl(0, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
    [pid 18352] select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout)
    [pid 18352] nanosleep({0, 1000000}, <unfinished ...>
    [pid 850] <... nanosleep resumed> NULL) = 0

    Are their ways to reduce this?

    Probably. Have you compared running sbbs both as a daemon and not as a daemon? It might take some more experimentation on your part to find where the CPU utilization is coming from exactly.

    digital man

    Synchronet "Real Fact" #2:
    Synchronet version 2 for DOS and OS/2 was released to the public domain in 1997.
    Norco, CA WX: 60.1F, 46.0% humidity, 3 mph ENE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Alterego@VERT/ALTERANT to Digital Man on Monday, December 16, 2019 10:53:35
    Re: Idle CPU usage
    By: Digital Man to Alterego on Sun Dec 15 2019 03:22 pm

    Probably. Have you compared running sbbs both as a daemon and not as a daemon? It might take some more experimentation on your part to find where the CPU utilization is coming from exactly.

    So I have 2 running instances.

    One starts with just "sbbs" in the foreground.

    The other starts via supervisor with "sbbs -syslog"

    Are you suggesting that starting SBBS with "-d" would result in less CPU usage? ...deon


    ... If at first you don't succeed, destroy all evidence that you tried.

    ---
    Synchronet Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to Alterego on Sunday, December 15, 2019 16:14:08
    Re: Idle CPU usage
    By: Alterego to Digital Man on Mon Dec 16 2019 10:53 am

    Re: Idle CPU usage
    By: Digital Man to Alterego on Sun Dec 15 2019 03:22 pm

    Probably. Have you compared running sbbs both as a daemon and not as a daemon? It might take some more experimentation on your part to find where the CPU utilization is coming from exactly.

    So I have 2 running instances.

    One starts with just "sbbs" in the foreground.

    The other starts via supervisor with "sbbs -syslog"

    On the same system using the same sbbs.ini file? I wouldn't expect that to work correctly. What are you trying to do with that configuration?

    Are you suggesting that starting SBBS with "-d" would result in less CPU usage?

    The strace output you pasted looked like polling for keyboard input. When run daemonized, sbbs doesn't look for local keyboard input.

    digital man

    Synchronet/BBS Terminology Definition #55:
    POP3 = Post Office Protocol version 3
    Norco, CA WX: 59.3F, 41.0% humidity, 4 mph NE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Alterego@VERT/ALTERANT to Digital Man on Monday, December 16, 2019 13:20:11
    Howdy,

    I've been playing with mailling lists - with my board receiving maillist emails - however, I've noticed they are not posting:

    mail 0036 SMTPS !luv-main-request@... (user #0) cannot post on LUV Main (reason: 13)

    Where can I find out what "reason: 13" is?

    In my ACL I have "LEVEL 99 OR USER = 0" as per the example in the wiki... ...deon


    ... Money can't buy friends but you can get a better class of enemy.

    ---
    Synchronet Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to Alterego on Sunday, December 15, 2019 20:32:03
    Re: Idle CPU usage
    By: Alterego to Digital Man on Mon Dec 16 2019 01:20 pm

    Howdy,

    I've been playing with mailling lists - with my board receiving maillist emails - however, I've noticed they are not posting:

    mail 0036 SMTPS !luv-main-request@... (user #0) cannot post on LUV Main (reason: 13)

    Where can I find out what "reason: 13" is?

    Item 13 in the ctrl/text.dat file:
    "\1r\1h\r\n\7You have posted too many times today.\r\n" 013 TooManyPostsToday

    In my ACL I have "LEVEL 99 OR USER = 0" as per the example in the wiki...

    Configuration step 6 at http://wiki.synchro.net/module:listgate

    digital man

    Synchronet/BBS Terminology Definition #47:
    MUD = Multi-User Dungeon
    Norco, CA WX: 51.7F, 43.0% humidity, 0 mph W wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Alterego@VERT/ALTERANT to Digital Man on Monday, December 16, 2019 15:41:04
    Re: Idle CPU usage
    By: Digital Man to Alterego on Sun Dec 15 2019 08:32 pm

    Configuration step 6 at http://wiki.synchro.net/module:listgate

    Argh, thank you. I've read that wiki a few times, and I must have missed that.

    BTW: Without setting a posts per day for level 0 - is it possiblet to set a "particular email address" (ie: the list from address), can post an unlimited number of times?

    And thereby any emails from non list addresses, destined for this sub are rejected?
    ...deon


    ... Conistency is the last refuge of the unimaginative.

    ---
    Synchronet Alterant | an SBBS in Docker on Pi!
  • From Tony Langdon@VERT to Alterego on Monday, December 16, 2019 20:41:00
    On 12-16-19 13:20, Alterego wrote to Digital Man <=-

    Howdy,

    I've been playing with mailling lists - with my board receiving
    maillist emails - however, I've noticed they are not posting:

    mail 0036 SMTPS !luv-main-request@... (user #0) cannot post on LUV Main (reason: 13)

    Hmm, I had forgotten about LUV, but I am still subscribed. Perhaps I should feed it to the BBS, then I'll keep up with it. :)


    ... What has 4 legs and an arm? A pit bull.
    === MultiMail/Win v0.51
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Alterego on Monday, December 16, 2019 10:27:51
    Re: Idle CPU usage
    By: Alterego to Digital Man on Mon Dec 16 2019 03:41 pm

    Re: Idle CPU usage
    By: Digital Man to Alterego on Sun Dec 15 2019 08:32 pm

    Configuration step 6 at http://wiki.synchro.net/module:listgate

    Argh, thank you. I've read that wiki a few times, and I must have missed that.

    BTW: Without setting a posts per day for level 0 - is it possiblet to set a "particular email address" (ie: the list from address), can post an unlimited number of times?

    You'd have to create a user account and have the list poster authenticate as that user. Probably not practical.

    And thereby any emails from non list addresses, destined for this sub are rejected?

    Can't think of a way off hand. Posted messages are actually handled by the mail server, not the listgate module.

    digital man

    This Is Spinal Tap quote #3:
    How much more black could this be? and the answer is none. None more black. Norco, CA WX: 58.7F, 27.0% humidity, 4 mph ESE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Tony Langdon@VERT to Digital Man on Tuesday, December 17, 2019 06:36:00
    On 12-16-19 10:27, Digital Man wrote to Alterego <=-

    And thereby any emails from non list addresses, destined for this sub are rejected?

    Can't think of a way off hand. Posted messages are actually handled by
    the mail server, not the listgate module.

    I did notice that. I can see potential issues if someone does work out what's going on - they could spam the echo. Not likely anyone would bother, but it's possible. I am making use of that property to effectively funnel 2 mailing lists into one echo, but of course, listgate can only post to one of the lists.
    That's fine for my situation, because one of those two mailing lists is being phased out, the other (the one that listgate.js psts to) is its replacement, and I only need to be able to post to that, but want to catch posts from the old list.


    ... Southern DOS> Ya'll reckon? (Y)ep/(n)ope
    === MultiMail/Win v0.51
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Tony Langdon on Monday, December 16, 2019 14:36:02
    Re: Re: Idle CPU usage
    By: Tony Langdon to Digital Man on Tue Dec 17 2019 06:36 am

    On 12-16-19 10:27, Digital Man wrote to Alterego <=-

    And thereby any emails from non list addresses, destined for this sub are rejected?

    Can't think of a way off hand. Posted messages are actually handled by the mail server, not the listgate module.

    I did notice that. I can see potential issues if someone does work out what's going on - they could spam the echo. Not likely anyone would bother, but it's possible. I am making use of that property to effectively funnel 2 mailing lists into one echo, but of course, listgate can only post to one of the lists.
    That's fine for my situation, because one of those two mailing lists is being phased out, the other (the one that listgate.js psts to) is its replacement, and I only need to be able to post to that, but want to catch posts from the old list.

    There's probably some method todo what you want using an external mail processor (ctrl/mailproc.ini).

    digital man

    Synchronet/BBS Terminology Definition #52:
    PET = Personal Electronic Transactor (Commodore computer)
    Norco, CA WX: 60.3F, 23.0% humidity, 9 mph S wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Tony Langdon@VERT to Digital Man on Tuesday, December 17, 2019 21:12:00
    On 12-16-19 14:36, Digital Man wrote to Tony Langdon <=-

    I did notice that. I can see potential issues if someone does work out what's going on - they could spam the echo. Not likely anyone would bother, but it's possible. I am making use of that property to effectively funnel 2 mailing lists into one echo, but of course, listgate can only post to one of the lists.
    That's fine for my situation, because one of those two mailing lists is being phased out, the other (the one that listgate.js psts to) is its replacement, and I only need to be able to post to that, but want to catch posts from the old list.

    There's probably some method todo what you want using an external mail processor (ctrl/mailproc.ini).

    It's working fine as is for my purposes. I'm seeing both lists in the one echo.. :) But yeah, I'll have to look into mailproc.ini to see if a filter that looks for a List-Id header with the correct value can be setup.


    ... There's always one more bug.
    === MultiMail/Win v0.51
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Tony Langdon on Tuesday, December 17, 2019 09:22:07
    Re: Re: Idle CPU usage
    By: Tony Langdon to Digital Man on Tue Dec 17 2019 06:36:00


    Can't think of a way off hand. Posted messages are actually handled by
    the mail server, not the listgate module.

    I did notice that. I can see potential issues if someone does work out what's going on - they could spam the echo. Not likely anyone would bother, but it's possible.

    we had almost the same thing with gigo gating into echos and mailing lists... there was a "secret" poster that we configured for each echo and/or mailing list... if someone figured what it was and the proper format of the options, they could do the same...


    )\/(ark

    ---
    Synchronet The SouthEast Star Mail HUB - SESTAR
  • From Tony Langdon@VERT to Rampage on Wednesday, December 18, 2019 17:10:00
    On 12-17-19 09:22, Rampage wrote to Tony Langdon <=-

    we had almost the same thing with gigo gating into echos and mailing lists... there was a "secret" poster that we configured for each echo and/or mailing list... if someone figured what it was and the proper format of the options, they could do the same...

    Hmm, I didn't think GIGO could post messages from a single user, or perhaps that came later? I remember people having to individually subscribe and be set to NOMAIL. Wasn't a big issue, because I was the only user of gated mailing lists on my gateway.


    ... You can only make one dot at a time
    === MultiMail/Win v0.51
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rampage@VERT/SESTAR to Tony Langdon on Wednesday, December 18, 2019 07:44:19
    Re: Re: Idle CPU usage
    By: Tony Langdon to Rampage on Wed Dec 18 2019 17:10:00


    we had almost the same thing with gigo gating into echos and mailing
    lists... there was a "secret" poster that we configured for each echo
    and/or mailing list... if someone figured what it was and the proper
    format of the options, they could do the same...

    Hmm, I didn't think GIGO could post messages from a single user, or perhaps that came later? I remember people having to individually subscribe and be set to NOMAIL. Wasn't a big issue, because I was
    the only user of gated mailing lists on my gateway.

    i don't recall NOMAIL being set in my configs... i hosted some mailing lists and gated some to echos, one-way and bi-directional... there were special entries i had to make so the gating process would post to those entries and the messages would make the jump over the line... it was these special entries that could be abused if someone figured them out...

    like these from my maillist.cfg:

    ----->8 snip 8<-----

    SITE wp_e2n news ; Any mail sent to news.group@wp_e2n.yoursite.domain gets posted

    SITE wp_e2e echo ; Any mail sent to echoname@wp_e2e.yoursite.domain gets posted

    ;; This is the WPT-L WPUSA TEST mailing list.
    ;; it is gated between wpt-l@ftn.wpusa.dynip.com and the WPT echo
    ;

    CAPTUREPRIV x:\gigo\WPT-L.ML X:\gigo\maillist\wpt\ wpt-l wpt-owner - WPT mlbad.txt WPT-L Mailing List

    USER wpt-l BOUNCE nowpt-l.txt

    EXPLODE X:\gigo\maillist\wpt\ WPT-L.ML wpt-owner - WPT@wp_e2e.ftn.wpusa.dynip.com

    ;
    ;; This is the QCS-L general QCS support mailing list.
    ;; it is gated between qcs-l@ftn.wpusa.dynip.com and the QCS_QCSML echo
    ;

    CAPTUREPRIV x:\gigo\QCS-L.ML X:\gigo\maillist\qcs\ qcs-l qcs-owner - QCN_QCSML mlbad.txt QCS-L Mailing List

    USER qcs-l BOUNCE noqcs-l.txt

    EXPLODE X:\gigo\maillist\qcs\ QCS-L.ML qcs-owner - QCN_QCSML@wp_e2e.ftn.wpusa.dynip.com

    ----->8 snip 8<-----

    so it was SITE entries to create a domain and the list name was the user name to post to... there may be another part or two that i don't recall and don't obviously see right now but yeah, if someone figured out those user names and domains and sent mail to them, that mail would be sent directly to the echo...


    )\/(ark

    ---
    Synchronet The SouthEast Star Mail HUB - SESTAR
  • From Tony Langdon@VERT to Rampage on Friday, December 20, 2019 20:24:00
    On 12-18-19 07:44, Rampage wrote to Tony Langdon <=-

    like these from my maillist.cfg:


    One of these days, I'll have to dig up my old GIGO configs. :)


    ... It's easy to be brave from a safe distance.
    === MultiMail/Win v0.51
    --- SBBSecho 3.10-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net