backend.ai icon indicating copy to clipboard operation
backend.ai copied to clipboard

manager/api/resource.py/check_presets doesn't work well

Open leejiwon1125 opened this issue 2 years ago • 0 comments

What Operating System(s) are you seeing this problem on?

Linux (x86-64)

Backend.AI version

23.03

Describe the bug

image image

If we make session in http://127.0.0.1:9081/ this bug happens. The first picture above CPU process bar prints 0/3, but if we make a session that uses one CPU the process bar works wrong: It prints 1/2 not 1/3.

The superficial reason for this is that the code is implemented to calculate total number of CPU as sum of 'using' CPU and 'remaining' CPU. Under this condition, 'using' CPU always zero and problem occured.

Then, why 'using' CPU always counts zero as you can see below picture? image

That is because manager/api/resource.py/check_presets doesn't do its work properly. We expect that function 'check_presets' makes 'response' value( used in backend.ai-webui/src/components/backend-ai-resource-broker.ts ) that include information of resources correctly but it doesn't.

image image This is my debugging code for 'check_presets' and result. As you can see, the code doesn't enter the part that sets 'using' CPU: It doesn't print '2'.

I don't know the reason why this problem occur.

This phenomenon are also occurring in RAM.(maybe GPU either)

To Reproduce

make session in http://127.0.0.1:9081/

Expected Behavior

I mentioned this above.

Anything else?

No response

leejiwon1125 avatar Feb 09 '23 09:02 leejiwon1125