Menu

#221 syncterm CPU usage seems high

1.9
closed
None
SDL
1.8b
2026-03-30
2026-02-19
Adam Clark
No

syncterm seems very CPU heavy - sitting at the dialing directory it can consume 4-5% of one CPU core, pressing the up/down arrows to go through the directory (holding, say, the up arrow down) will consume ~60% cpu of one core, and when connected to a synchronet BBS and just sitting idle at the main menu consumes 20-25% (checked via both telnet and ssh connections, no difference)

Now I realise my CPU is getting a little long in the tooth, it's a quad-core Core i7-2600K, but I almost unreasonably expect something like syncterm to use nearly 0 CPU in most circumstances. Maybe that's unrealistic in an SDL environment, I'm not sure.

More information on the system involved:

libsdl2 2.32.6
glibc 2.42
gcc 15.2.1

Testing from linux console it seems CPU is down to about 4-5% while sitting idle at a BBS main menu, but would that not still be a little high?

Is there anything I could do here to help diagnose what's causing the CPU time?

Discussion

  • Adam Clark

    Adam Clark - 2026-02-19

    Further, I should mention that the syncterm version is current from synchronet's gitlab master branch

     
  • Anonymous

    Anonymous - 2026-02-22

    The CPU utilization depends greatly on the type and amount of scaling you use. In Program Settings -> Scaling, setting to "External" should greatly reduce it.

     
  • Stephen James Hurd

    I would also suggest using X11 mode instead of SDL mode on Linux.

     
    • Adam Clark

      Adam Clark - 2026-03-06

      Thanks, I did run through both of your suggestions. I think using X mode is the winner overall - CPU usage was a bit higher in Curses mode over X11 mode, and X mode is pretty minimal.

      The External Scaling option when using SDL makes things a little blurry, but does reduce CPU time as well.

      Is this just something that will always be seen under SDL mode?

       
      • Stephen James Hurd

        External scaling leaves how the scaling is done up to "something else", so exactly how it looks and how much CPU it takes will depend on what that other thing does. I've seen the same binary look very different using external scaling on two different systems.

        In general, having one of the two dimension integer scaled helps with CPU utilization (Use ALT-Left/Right arrow to snap).

        If you use the "80x25 LCD" output mode and reduce the window size to the minimum (pressing Alt-Left until it stops getting smaller), CPU utilization will be at the baseline without the scaling overhead. If you see high CPU like that, it would be worth digging in to.

         
  • Stephen James Hurd

    • status: open --> closed
    • assigned_to: Stephen James Hurd
     
  • Stephen James Hurd

    Marking this as closed, it seems we've reached a happy place.

     
  • Adam Clark

    Adam Clark - 2026-03-30

    Hopefully this doesn't re-open the ticket - just wanted to add that the newest versions that have Wayland support seem to be much more efficient on my systems.

    Thanks for the suggestions along the way, too, it's been helpful in understanding and managing things.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB