-
Notifications
You must be signed in to change notification settings - Fork 162
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
How to profile USDX (preferably Linux)? #801
Comments
I blame your system setup for this. Here on an old laptop with Haswell refresh CPU and Windows 11, it is at about 5% CPU usage. |
I mean, seriously, USDX runs perfectly fine on a 12 years old laptop which did cost 350€ when it was new back then. You should look at your graphics drivers and OS's rendering pipeline / xOrg/Wayland config. |
In general, such non-issues might be better fitting into the discussion feature of GitHub, instead of being "issues" which spamming everyone who follows the project. |
Github has a discussion feature that is not tied to issues or pull requests? Where? I can confirm that rendering is slow on 2nd generation Intel Core GPUs (Pentium 997 in my case). If you display the help text, the cpu usage of the main thread rises to 100% and the frame rate drops to 54 fps even when playing in an 800x600 window. So I guess the GPU doesn't like the way we draw text. I'll try to build a bleeding edge LLVM+Mesa on that machine to see if that is faster.
@barbeque-squared, what does |
@s09bQ5
Editor displaying help overlay idling: I can actually Enter on any I'd also expect to see at least some substantial differences between the two screenshots, considering just showing the help text almost doubles the actual CPU usage? Or is that a wrong assumption on my part? |
You are listing different threads of the same process. Use
By limiting the display to one process, the percentages for ultrastardx will always add up to 100%. And if the GPU rendering needs twice as many CPU cycles, all you will see is that some GPU-unrelated symbols use about half as many %. For absolute values I suggest to run ultrastardx on a single CPU core ( You need to restart |
The I did have an "a ha!" moment when the libspa-audioconvert.so kept being near the top and just happened to open It's still using quite a lot of CPU of course, but now most of it seems to come from recording and rendering (both of which are to be expected), but at least I can actually scroll in other applications again if the editor is open. I suspect there's some big gains to be made by using some kind of rendering buffer for mostly static stuff like menu buttons, but that's for another time. Before I close this ticket I would like to condense some of the findings on the wiki (the pw-top/resampling stuff) and in some markdown file (the profiling stuff). I'll try to get around to it tomorrow but it might be a few weeks. I'll assign it to myself in the meantime. |
I'm noticing that on my Linux system, USDX is using quite a lot of CPU for essentially not doing all that much. These are rough averages as reported by
htop
, taken without video and generally just idling on the screen, on a i3-3250:Especially the editor one is making other applications -- at least Firefox and Discord -- really hard to use. This is true even if I completely close Discord and in Firefox have just a single tab with a hundred lines plaintext file, scrolling gets very slow.
I suspect USDX is doing something and I want to figure out what.
What I've tried:
make PFLAGS="-pg -Fl/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1"
then usegprof
perf
Number 1 appears to only take measurements for one thread (the main thread?). I don't know what to make of number 2; maybe I'm missing compile flags and need to run
perf
in a certain way, but all I've got so far is gibberish.What I'm looking for is some way to figure out what is actually causing the CPU usage. Creative solutions like not using threads at all are also fine, as long as pinpointing where it's using CPU is still possible.
Rejected tools:
I did see Intel VTune Amplifier mentioned on some StackOverflow answer. I did not test this because on Archlinux this is part of some 15GB suite. Moreover, it only works for Intel CPU's which would make it useless for people with other CPU's.
The text was updated successfully, but these errors were encountered: