CPULoad measurement

From: Ronny Meeus
Date: Wed Feb 26 2014 - 14:25:52 EST


Hello

My application consists of several hundreds of threads.
I want to create a loadcontrol mechanism at application level so that
when the cpuload of a group of threads crosses a certain
(configurable) threshold, the threads will voluntary yield until the
load condition is over. For this I need to have a mechanism int the
kernel that calculates the consolidated load of each of the
thread-groups.

Is such a mechanism in place in the kernel?

I could for example define a cgroup per group I want to define and
assign the threads to the correct group. I have no clue whether
internally in the kernel the total CPUload consumed per cgroup is
kept. If that would be the case, it would be ideal.

I do not want to make the sum of all the thread's load (for example
based on the info in the proc filesystem) because this is generating
too much overhead.

Any hint/help/info is much appreciated.

Best regards,
Ronny
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/