Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issues #1614

Closed
agr opened this Issue Jun 21, 2018 · 14 comments

Comments

Projects
2 participants
@agr
Copy link

agr commented Jun 21, 2018

Versions

ConEmu build: 180528 x64 (stable)
OS version: Windows 10 1803 x64
Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): Far manager

Problem description

When computer is on for a long time, eventually the FPS in conemu drops to uncomfortable levels (~3-6, normally, it's 45-50). It reproduces fairly consistently on my computer (I have it turned on all the time), I'm not sure if it's the uptime that causes it, but it definitely occurs after a few days after last reboot and rebooting the computer mitigates the issue for several days.

I don't have statistics on how many days it took in the past before performance dropped, but in the latest issue it took 6.5 days.

Closing and reopening ConEmu does not help. Signing out and signing back in does not help. Rebooting the machine helps. No process was consuming any considerable amount of CPU. Not sure what was ConEmu's CPU usage, didn't check and I already rebooted, so need to wait till it reproduces again.

Steps to reproduce

  1. Have the computer turned on running Far manager in Conemu for several days;
  2. Open a directory in Far with a lot of files;
  3. Press and hold "down" key;

Actual results

Cursor jumping, skipping a bunch of files each time. Overall sluggish reaction to key presses.

Expected results

Smooth scrolling, negligible delay before console reacts to a key press.

Additional files

conemu_low_fps

settings.xml

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jun 21, 2018

  • Windows 10 stable it insider build?
  • I have ConEmu/Far opened for days without issues. But my resolution is considerably smaller.
  • The problem comes from RPS I think, that means conhost processes API calls much much slower than expected, if so - ConEmu can't do anything to bypass that.
  • Try to: resize window, set "sleep in background" if it wasn't set.
@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 21, 2018

I use stable build of Windows 10.
What API are you talking about? Can I profile the duration of those somehow?
Will try resizing and the "sleep" setting once it reproduces again.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jun 21, 2018

Generally it's a ReadConsoleOutput function called from far.exe/ConEmuC.exe

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

After 4 days I am seeing slowdowns again: in a large directory pressing and holding the down key eventually makes FPS and RPS converge to 11.6 and while the key is held ConEmu process uses about 10% of the CPU (i7-6700 - 4 cores with HT):
image
When key is released CPU usage drops.

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

Ran ConEmu in a VS profiler for a few seconds while holding the key.

Top self CPU consumption:
Top self CPU consumers

Top total CPU consumption.
Top total CPU consumers

I guess I need a debug symbols to see Conemu function names, but it seems it spends most of the time inside the CreateToolhelp32Snapshot function, not sure what's the call stack for it.

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

It's seem to gradually get worse, uptime now is almost 4 days, 3 hours and FPS/RPS dropped to 10.8 from 11.6 3 hours ago.

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

CPU consumption seem to be split between two threads:

image

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jun 25, 2018

How many total processes/threads you have running at that moment in your system.

@Maximus5 Maximus5 added this to To Do in Inspection via automation Jun 25, 2018

@Maximus5 Maximus5 added the processes label Jun 25, 2018

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jun 25, 2018

And I'm interested in exact function names in ConEmu64.exe.
Symbols are available here: https://sourceforge.net/projects/conemu/files/Symbols/
Or I need at least exact ConEmu build no

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

~290 processes and ~5100 threads, Build 180528

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 25, 2018

Top total with symbols:
image

@agr

This comment has been minimized.

Copy link
Author

agr commented Jun 26, 2018

I've also noticed that total memory usage in the system was quite high after 4 days (33 out of 32 GB as reported by process explorer), after killing all high memory using processes (usage dropped to ~14 GB) I did see some perf improvement (FPS/RPS went up from 10.6 to ~11.5), but I'm not sure how significant the improvement is. I just rebooted, and after reboot memory usage is at ~7.5 GB and ConEmu FPS is ~45 and RPS is 70+.

Maximus5 added a commit that referenced this issue Jun 26, 2018

gh-1614: Fix long running session performance issues (CreateToolhelp3…
…2Snapshot).

  CreateToolhelp32Snapshot was constantly called to find info about absent PID expected to be ConHost.

@Maximus5 Maximus5 removed this from To Do in Inspection Jun 27, 2018

@Maximus5 Maximus5 added this to To Do in ConEmu via automation Jun 27, 2018

@Maximus5 Maximus5 moved this from To Do to Ready for Testing in ConEmu Jun 27, 2018

@agr

This comment has been minimized.

Copy link
Author

agr commented Jul 3, 2018

I am on 180626, after 4 days of uptime perf looks good so far. RPS 90+, FPS ~50. Have to reboot though, so it'll take some time to validate on longer uptimes.

Thanks for the fix.

@agr

This comment has been minimized.

Copy link
Author

agr commented Jul 11, 2018

Still works fine after 8 days of uptime. RPS still 90+, FPS dropped to ~40, but still OK. From my side it seems the issue was fixed.

@Maximus5 Maximus5 closed this Jul 11, 2018

ConEmu automation moved this from Ready for Testing to Done Jul 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.