Skip to content

0.11.0 seems to be slower than 0.10.2 on Ubuntu #1777

Open

Description

@neur1n

Checklist

What operating system and version are you using?

Ubuntu 20.04 & 22.04

What architecture are you using?

x86_64/AMD64

What terminal(s) are you running bottom on that are experiencing the problem?

Wezterm 20240204-094054-a0974a25

(Optional) What filesystem(s) are you using?

No response

What version of bottom are you running?

0.11.0

How did you install bottom?

Installed by downloading prebuilt binary from GitHub.

Describe the issue

Version 0.11.0 of bottom exhibits significantly higher latency compared to version 0.10.2 when displaying the initial statistics, on Ubuntu but not Windows 11 though.

Testing Method:

  1. Launch btm and immediately exit upon the appearance of the statistics.
  2. Measure the elapsed time using $env.CMD_DURATION_MS in Nushell. Acknowledging this is not a precise benchmark, but relative differences are notable.

Results:
• 0.10.2: ~2447 ms
• 0.11.0: ~12344 ms

What is the expected behaviour?

The latency should be similar.

What is the actual behaviour?

Statistics takes a long time to show up.

How can we reproduce this?

Launch bottom and profile the time it takes for the initial statistics to show up.

Additional information

No response

Activity

  1. added
    bugSomething isn't working the way that is expected.
    on Aug 11, 2025
  2. ClementTsang commented on Aug 11, 2025

    @ClementTsang
    Owner

    Hmm... not sure why this is the case, maybe there's extra work being done due to the stuff like GPU? Actually, if you run btm --disable_gpu, does it change anything?

    I'll look into it though and see if I can replicate on my Linux machine.

  3. ClementTsang commented on Aug 11, 2025

    @ClementTsang
    Owner

    Hmm... I can't replicate this on either zsh or nu, but I can take a look and see if I can make it so things don't block as much/there's a timeout (#687 might be related).

  4. ClementTsang commented on Aug 11, 2025

    @ClementTsang
    Owner

    Also just double checking, which binary did you download?

  5. neur1n commented on Aug 12, 2025

    @neur1n
    Author

    @ClementTsang Thanks for the response.

    Using --enable_gpu on v0.10.2 and --disable_gpu on v0.11.0 makes neglectable differences:

    Version w/ GPU (ms) w/o GPU (ms)
    0.10.2 1358 1258
    0.11.2 12402 11357

    I'm using the bottom_x86_64-unknown-linux-<c>.tar.gz where <c> is gnu and musl (I've tested both).

  6. ClementTsang commented on Aug 12, 2025

    @ClementTsang
    Owner

    Thanks for the info, at least that narrows some things down.

  7. neur1n commented on Aug 12, 2025

    @neur1n
    Author

    Hmm... I can't replicate this on either zsh or nu, but I can take a look and see if I can make it so things don't block as much/there's a timeout (#687 might be related).

    Which part of the source code is related to the timeout mechanism?

  8. ClementTsang commented on Aug 12, 2025

    @ClementTsang
    Owner

    There isn't any at the moment... it's all synchronous code, data collection runs on a separate thread.

    It's unlikely tbh that I can actually add a timeout (barring going into async but that's a very hmmm choice for this is my gut feeling) I can explore threading things more though.

  9. neur1n commented on Aug 12, 2025

    @neur1n
    Author

    Though it seems counterintuitive to me, the new version runs well on Windows 11.

  10. neur1n commented on Aug 15, 2025

    @neur1n
    Author

    @ClementTsang Thanks for your work on v0.11.1, but the startup is still slow. Is there a way I can debug on my machine?

  11. ClementTsang commented on Aug 15, 2025

    @ClementTsang
    Owner

    Barring making code changes like debug logs, not really. I could compile a binary here with debug logs I guess.

  12. ClementTsang commented on Aug 15, 2025

    @ClementTsang
    Owner

    Could you also give me some info on system specs? e.g. GPU, CPU, etc?

  13. ClementTsang commented on Aug 15, 2025

    @ClementTsang
    Owner

    Also tested it on wezterm on my Linux machine and there's no difference, so it isn't that.

  14. neur1n commented on Aug 15, 2025

    @neur1n
    Author

    Could you also give me some info on system specs? e.g. GPU, CPU, etc?

    • Windows 11: AMD Ryzen 5 5500 + GeForce RTX 4060
    • Ubuntu 20.04: AMD EPYC 7502 32 Core + GeForce RTX 3090 * 2
    • Ubuntu 22.04: AMD EPYC 7T83 64 Core + GeForce RTX 4090 * 7
  15. jamartin9 commented on Aug 15, 2025

    @jamartin9
    Contributor

    Is there a way I can debug on my machine?

    With --disable_gpu you could try changing the layout rows in the bottom config to use only a single widget at a time; to isolate if any are slow. Is the empty widget by itself slow? Does basic mode UI load slowly too? The used_widget/widgets_to_harvest checks should avoid some collections/drawing...

  16. neur1n commented on Aug 16, 2025

    @neur1n
    Author

    It is still slow even I use the basic mode and only one column for the processes widget. With 0.10.2, the latency is short even I use the full mode.

  17. jamartin9 commented on Aug 16, 2025

    @jamartin9
    Contributor

    It is still slow even I use the basic mode and only one column for the processes widget.

    I was refering to the the layout only using a single widget so the others will not be drawn/collected in full mode at all incase one is unusually slow. Just changing the active columns does not do this afaik. Something like the following at the bottom of the toml config (change type to proc/cpu/mem/net/temp/disk):

    [[row]]
    #  ratio=30
    #  [[row.child]]
    #    type="net"
      [[row.child]]
        type="empty"
    

    Thanks for the good information on basic mode still being slow... (There was a refactor around points/graph UI)

    With 0.10.2, the latency is short even I use the full mode.

    Which is odd as they both collect and display mostly the same information. That suggests collections may not be the slow part; that something has changed for all widgets or a specific one has found a bad pathological case. If the latency persists with little to no widgets/collections (ie empty) then that suggests a more endemic issue like a library.

  18. ClementTsang commented on Aug 16, 2025

    @ClementTsang
    Owner

    If possible could you record an example of the behaviour? Anything might help when we can't locally reproduce it.

  19. ClementTsang commented on Aug 16, 2025

    @ClementTsang
    Owner

    And yes thanks for trying out various widgets - just to check, have you tried with the process widget disabled as well?

  20. neur1n commented on Aug 17, 2025

    @neur1n
    Author

    @jamartin9 Thanks for the clarification.

    It seems that the bottleneck lies in the process widget. All other widgets display the statistics almost immediately on startup. I record an example of using the process widget only:

    btm-0.11-1.mp4
  21. ClementTsang commented on Aug 17, 2025

    @ClementTsang
    Owner

    Thanks! That narrows down things a lot.

  22. neur1n commented on Oct 29, 2025

    @neur1n
    Author

    Could you also give me some info on system specs? e.g. GPU, CPU, etc?

    • Windows 11: AMD Ryzen 5 5500 + GeForce RTX 4060
    • Ubuntu 20.04: AMD EPYC 7502 32 Core + GeForce RTX 3090 * 2
    • Ubuntu 22.04: AMD EPYC 7T83 64 Core + GeForce RTX 4090 * 7

    Updates about 0.11.2:

    1. It now costs about 5 seconds on the Ubuntu 20.04 machine and still 11 seconds on the Ubuntu 22.04.
    2. It immediately shows the proc widget on an openEuler 22.03 machine!
  23. neur1n commented on Dec 19, 2025

    @neur1n
    Author

    Currently this behavior only happens on the Ubuntu 20.04 machine and the delay shortens from 11 seconds to about 3 seconds. Another machine with the same CPU and GPUs, but with Ubuntu 24.04 and much bigger RAMs, does not have this issue. I wonder if it is OS related.

    It can be closed if you want. Thanks for all the efforts.

  24. ClementTsang commented on Dec 19, 2025

    @ClementTsang
    Owner

    Thanks for the update - I can keep it open for now as this is still pretty interesting to me, and it's a good motivator to look for possible slowdowns/speed up the data collection step anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working the way that is expected.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions