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

Switching user in jupyter makes /api/metrics slowly #97

Open
zenglw06 opened this issue May 7, 2021 · 3 comments
Open

Switching user in jupyter makes /api/metrics slowly #97

zenglw06 opened this issue May 7, 2021 · 3 comments

Comments

@zenglw06
Copy link

zenglw06 commented May 7, 2021

When I add some users in jupyter, constantly switching users makes the response of /api/metrics slowly.

Suppose there are two users root and jov, I try the following command,

#  default user is jov, now switch to root
sudo su 

# switch to jov
su jov

# switch to root
sudo su
# switch to jov
su jov
...

before switching users, the response time of /api/metrics is 300ms
After switching uses, the response time of /api/metrics is 1600ms.

This is too weird

@welcome
Copy link

welcome bot commented May 7, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@zenglw06
Copy link
Author

zenglw06 commented May 7, 2021

Supplementary note

If i try 'exit' command in the terminal, the response time of /api/merics return to normal level

@jhgoebbert
Copy link

The response time is mainly influenced by the time the following get-function takes:
https://github.com/jupyter-server/jupyter-resource-usage/blob/master/jupyter_resource_usage/api.py#L20

I would assume the time the psutil-calls answer are different depending on how many processes/users are active on the system. This seems not to be an issue of jupyter-resource-usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants