cgru
cgru copied to clipboard
Task ressources is collected from machine ressources
Task ressources are collected from machine ressources and not actual task ressources. When running multiple tasks at the same time it gives an incorrect picture.
I would suggest that eg. 'res_mem_peak_mb' is renamed 'host_res_mem_peak_mb' to start with before a proper solution to collect task ressources is in place.
Hi! May be it is not enough correct, but was designed suggesting that resources are important on a "heavy" tasks, and such "heavy" tasks are usually running single on the host, just one task at the same host at the same time. And if somebody needs resources per task, parser::processResources() function can be overloaded.
Yes, we can rename res_mem_peak_mb
in host_res_mem_peak_mb
.
Also res_cpu_agv
can be renamed in host_res_cpu_agv
.
May be someone will use both and res_mem_peak_mb
and host_res_mem_peak_mb
.
It makes total sense and it has it uses. But IMO it would be best to have both host and task ressources.
We're running several tasks per host quite alot. Mostly for nuke and houdini. When running multiple tasks it's essential to now how much the use per task to not overload the ressources on the host.
I see that it's only in the python part. Will create a merge request with the changes..
Or would it be better to collect the process stats in C? I've previously created a process stats collector, but was depending on a seperate python library (psutil).
I think that better to do it in C. But it can be much harder than in Python. So I do not know, not a simple question.
So rename it now, so it doesn't break too much and make ready for task resources?
btw. psutil
should work in all OS'es.
Yes, multi-os is very good. Yes, we can rename it right now. It is a new feature, and i did not think that someone already wrote much in-house scripts depending on that names. Just AfWatch tasks window can recognize that names just to display some more human readable labels - i can fix it quickly.
May be better put import psutil
in some try block, to make afrender works w/o this module as before.