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

qrexec: support logging how long each part of processing takes #9363

Open
DemiMarie opened this issue Jul 19, 2024 · 5 comments
Open

qrexec: support logging how long each part of processing takes #9363

DemiMarie opened this issue Jul 19, 2024 · 5 comments
Labels
C: core good first issue This is a recommended issue for first-time contributors. P: major Priority: major. Between "default" and "critical" in severity. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@DemiMarie
Copy link

How to file a helpful issue

The problem you're addressing (if any)

If one wants to make qrexec faster, one needs to know what parts of qrexec are the bottleneck. Right now, this isn’t easy unless one patches the code. Yes, it’s Python and not hard to modify, but it would be nice to not need to do that.

The solution you'd like

Provide a flag (off by default) that spews performance information to the system log.

The value to a user, and who that user might be

People who want to make qrexec faster will have an easier time getting real data and not file issues like #6266 or #9361 that do not address the actual problems.

Completion criteria checklist

(This section is for developer use only. Please do not modify it.)

@DemiMarie DemiMarie added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Jul 19, 2024
@3hhh
Copy link

3hhh commented Jul 21, 2024

Related: #7075

I'd also be interested in this.

However at least on my system 40% (2,7s of 6.6s, kernel & Xen time excluded) of the qrexec wait time comes from systemd attempting to reach network.target. This was different back in 4.0 when qrexec didn't need to wait for the network stack as it didn't use sockets.

@marmarek
Copy link
Member

However at least on my system 40% (2,7s of 6.6s, kernel & Xen time excluded) of the qrexec wait time comes from systemd attempting to reach network.target

This sounds like you talk about system startup time. This is not what this issue is about. This one is about measuring individual stages of individual qrexec calls.

This was different back in 4.0 when qrexec didn't need to wait for the network stack as it didn't use sockets.

I don't think it's related to recently added socket service feature, there was no change in service dependencies.

@3hhh
Copy link

3hhh commented Jul 22, 2024 via email

@alimirjamali
Copy link

I believe this is a major issue. Comparing run-time of qvm-ls in dom0 with AppVM (with relevant policy rules):

dom0:

real    0m0.431s
user    0m0.147s
sys     0m0.056s

AppVM:

real    0m2.801s
user    0m0.212s
sys     0m0.220s

And I have absolutely no idea what is taking time here. Is it policy validation? Is it something else? Without this information, I do not know how I could help to improve it.

@DemiMarie DemiMarie added the good first issue This is a recommended issue for first-time contributors. label Nov 9, 2024
@DemiMarie
Copy link
Author

#9362 (caching of system info structure) would be a good place to start. @marmarek already did the measurements, so it is known to help.

@andrewdavidwong andrewdavidwong added P: major Priority: major. Between "default" and "critical" in severity. and removed P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core good first issue This is a recommended issue for first-time contributors. P: major Priority: major. Between "default" and "critical" in severity. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

5 participants