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

Containers, Java and things of that ilk #122

Open
lars-t-hansen opened this issue Oct 30, 2023 · 2 comments
Open

Containers, Java and things of that ilk #122

lars-t-hansen opened this issue Oct 30, 2023 · 2 comments
Labels
question Further information is requested

Comments

@lars-t-hansen
Copy link
Collaborator

I'm just noting this because it's a notable thing, but I don't know what to do about it exactly. Sonar can measure the CPU usage of a VM/Container/managed language, but memory usage may be trickier. Right now I am looking at a Java job that was told to use 512GB and lo, it allocates 512GB at the start and stays there. Containers and VMs may have similar behavior when viewed from the outside.

@bast
Copy link
Member

bast commented Nov 1, 2023

Thanks for noting this.

@lars-t-hansen lars-t-hansen added the question Further information is requested label Nov 9, 2023
@lars-t-hansen
Copy link
Collaborator Author

Job IDs and process IDs:

On a system without a batch queue (running sonar with --batchless), we're moving (#89) in the direction of job ID == process group ID, b/c that's how Unix (BSD/POSIX/Linux) likes it. The process group ID and process ID are in the same namespace: the process group ID is the process ID of the process group leader when the group is created.

This system creaks a bit in the presence of process ID namespaces. In that system, it's possible to create a new namespace with PIDs starting at 1, viewed from within the namespace. From outside the namespace, where sonar is normally running, the PIDs and job ID will be something else.

Since sonar will still be able to see what's going on in the system in the same way as for programs not running within a namespace, this is probably OK. There's the possibility of some confusion if the user observes the process group ID within the namespace / container, as it will not be the same as the job ID outside the container, observed by sonar.

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

No branches or pull requests

2 participants