cgroups and limit firefox processes cpu time
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
I hope i made clear what i meant, this is new to me and i haven't found other people with examples doing the same.
e.g
1 core
firefox 1 80%
firefox 2 60%
firefox 3 10%
now what i want is that the firefox processes 1 and 2 get the cpu time they want but if firefox process 3 is going todo something then he gets the cpu time he want's because the first two are over there limit.
I will be happy to answer questions to make this more clear.
With kind regards
William
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · william
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
Quoted 7 lines
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
Are these running on behalf of different users? You can always create a good hiearchy and organize. FAIR_USER scheduler option is going away soon. Some more context on the firefox applications and whose behalf they are running on, etc would help.
Signature · 2 lines
Three Cheers, Balbir Singh
A message that is not in the archive (sent off-list or not yet received): 4B5988DC.8020100-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Quoted 16 lines · Balbir Singh
Quoted 5 lines · william
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
Quoted 8 lines
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
Quoted 7 lines
Are these running on behalf of different users? You can always create a good hiearchy and organize.
FAIR_USERscheduler option is going away soon. Some more context on the firefox applications and whose behalf they are running on, etc would help.
The terminal server only hosts firefox processes for different users (user is only allowed to login once) to provide internet access in a secure way.
So i have 150 firefox processes for different users. So i cannot set one group, I have to put all those processes in a separate container if i get it right?
William
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 24 lines · william
Quoted 16 lines · Balbir Singh
Quoted 5 lines · william
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
Quoted 8 lines
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
Quoted 7 lines
Are these running on behalf of different users? You can always create a good hiearchy and organize.
FAIR_USERscheduler option is going away soon. Some more context on the firefox applications and whose behalf they are running on, etc would help.
Quoted 7 lines
The terminal server only hosts firefox processes for different users (user is only allowed to login once) to provide internet access in a secure way.
So i have 150 firefox processes for different users. So i cannot set one group, I have to put all those processes in a separate container if i get it right?
If the kernel is compiled with fair users then you are set, but that option might go away soon. Yes, putthing them all in their own cgroup is the best option. This can be done easily using libcgroup tools.
Signature · 2 lines
Three Cheers, Balbir Singh
A message that is not in the archive (sent off-list or not yet received): 4B598DB2.2030709-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Quoted 29 lines · Balbir Singh
Quoted 28 lines · william
Quoted 16 lines · Balbir Singh
Quoted 5 lines · william
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
Quoted 8 lines
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
Quoted 7 lines
Are these running on behalf of different users? You can always create a good hiearchy and organize.
FAIR_USERscheduler option is going away soon. Some more context on the firefox applications and whose behalf they are running on, etc would help.The terminal server only hosts firefox processes for different users (user is only allowed to login once) to provide internet access in a secure way.
Quoted 6 lines
Quoted 3 lines
So i have 150 firefox processes for different users. So i cannot set one group, I have to put all those processes in a separate container if i get it right?
If the kernel is compiled with fair users then you are set, but that option might go away soon.
I have already posted a patch to remove it, and it will go away in the next release of the kernel
Quoted 3 lines
Yes, putthing them all in their own cgroup is
the best option. This can be done easily using libcgroup tools.
Right, libcgroup already has the ability to sort on the basis of username and process name. You should be able to use that. Though it might be impractical at the moment since you will need to list all the usernames/groups in a configuration file.
Thanks,
Dhaval
A message that is not in the archive (sent off-list or not yet received): 8aa016e11001220400j5bc568e6vb9d087f4310203aa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 53 lines · Dhaval Giani
Quoted 33 lines · Balbir Singh
Quoted 31 lines · william
Quoted 17 lines · Balbir Singh
Quoted 5 lines · william
Hello list
I have a question about how i can limit the cpu for a firefox process on a terminal server.
Quoted 9 lines
We have 150 firefox processes running on a terminalserver but there are always people who take more cpu when they use flash or java. Some firefox processes take sometimes about 50 percent cpu time. Is there a way to give all firefox processes equal cpu shares so that other people who are using firefox for research have no issues (slow responding scrolling and menu) because there are a few firefox processes eating all the cpu time?
Quoted 8 lines
Are these running on behalf of different users? You can always create a good hiearchy and organize.
FAIR_USERscheduler option is going away soon. Some more context on the firefox applications and whose behalf they are running on, etc would help.The terminal server only hosts firefox processes for different users (user is only allowed to login once) to provide internet access in a secure way.
Quoted 7 lines
Quoted 4 lines
So i have 150 firefox processes for different users. So i cannot set one group, I have to put all those processes in a separate container if i get it right?
If the kernel is compiled with fair users then you are set, but that option might go away soon.
I have already posted a patch to remove it, and it will go away in the next release of the kernel
Quoted 4 lines
Yes, putthing them all in their own cgroup is
the best option. This can be done easily using libcgroup tools.
Quoted 5 lines
Right, libcgroup already has the ability to sort on the basis of username and process name. You should be able to use that. Though it might be impractical at the moment since you will need to list all the usernames/groups in a configuration file.
So then i would have to create a config file with 65k users in it :(
Would it be possible to setup a specific application in libcgroup, so that the libcgroup will create a container for that firefox process?
say something like:
#applicationgroup firefox {
# perm {
# task {
# application = /usr/bin/firefox;
# gid = users;
# }
# }
# cpu {
# cpu.shares = 10;
# }
#}
so every firefox process started should get the same cpu cycles. And if i understood it correctly a process can take as much cpu cycles as he want till the hard limit , if another process requests more cycles and has not reached his soft limit then the process which is already over the softlimit will be cut back?
Quoted 3 lines
Thanks,
Dhaval
Thank you for helping.
With kind regards
William