LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-14-2010, 10:54 AM   #1
Devilfish
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
Locking a user to a cpu core?


Something I've not had to worry about before but now running a small games community I want to give certain users a sandbox to run there own games servers. Is there a way to lock a user to a certain cpu core or will I have to resort to virtual os. I already use cpu threads locked to cores so games instances don't affect one another but now need to lock users not cpu threads.
Thanks in advanced for any advice.
PS running centos 5.2 on a dell 1u raq with dual * quad 3ghz xeon's.
 
Old 05-14-2010, 04:04 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I doubt you can lock a user into a core in linux yet.

VM overhead may affect the total system speed also.

Might look into pam or cpulimit.
 
Old 05-14-2010, 07:24 PM   #3
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I suggest Linux VServer. It provides better control for each virtual server. Also you can have better control for memory if the games have a poor memory management.

IMHO, setting up a server and using it to handle multiple games at once will make the setup be very, very slow even when using small games. Games like Unreal Tournament 2007 or 2004 is not small. FPS games are not small. One game can easily load a computer. I recommend one server to one game because they rely very heavy on real time.
 
Old 05-14-2010, 09:05 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Easy - look up cgroups (used to be cpusets).
You'll need to set up some scripts (was managed by PID not uid when I last looked at it) but you can contain any spawned/forked processes as well.
 
Old 05-15-2010, 01:59 AM   #5
Devilfish
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Electro View Post
I suggest Linux VServer. It provides better control for each virtual server. Also you can have better control for memory if the games have a poor memory management.

IMHO, setting up a server and using it to handle multiple games at once will make the setup be very, very slow even when using small games. Games like Unreal Tournament 2007 or 2004 is not small. FPS games are not small. One game can easily load a computer. I recommend one server to one game because they rely very heavy on real time.
The 1u raq spec is :
dual quad zeons @ 3 gig 80tdp e series cpu's
8 gig of mem
2* sas hds 15000rpm 3.5 inch 80 gigs in raid 1
redundant dual psu

And has been running for nearly 2 years with out a fault and performance has been spot on.

We have core 0 set to default for all process's and then 4 * tf2 * 33 player servers set to individual cores 1 to 5 and then 4 * l4d2 * 20 player servers on cores 6 & 7. Basicly this means all games instances will use cores 1 to 7 separately(with l4d2 spread over 2 cores) leaving core 0 for the O/S which even with mysql feeding stats to games it never loads the 0 core to high.
The game instances run fine tf2 sending 66 fps to clients when full dropping to 50 fps on badly optimized maps and heavy action but that is still much better than some gsp's would ever give you. Also I rebuilt the kernel to 1000mghz which gives a bit more bang for your buck.

We are however buying a new raq to compliment this one with similar spec which will give us room to allow a few map & game developers something to play with which is why I need to lock the user down so they don't load any other games instances that maybe on the same raq.

Last edited by Devilfish; 05-15-2010 at 02:01 AM.
 
Old 05-15-2010, 02:02 AM   #6
Devilfish
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Easy - look up cgroups (used to be cpusets).
You'll need to set up some scripts (was managed by PID not uid when I last looked at it) but you can contain any spawned/forked processes as well.
Thanks for the info will go look this up now, sounds like exactly what we need.
 
Old 05-15-2010, 08:32 PM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by Devilfish View Post
The 1u raq spec is :
dual quad zeons @ 3 gig 80tdp e series cpu's
8 gig of mem
2* sas hds 15000rpm 3.5 inch 80 gigs in raid 1
redundant dual psu

And has been running for nearly 2 years with out a fault and performance has been spot on.

We have core 0 set to default for all process's and then 4 * tf2 * 33 player servers set to individual cores 1 to 5 and then 4 * l4d2 * 20 player servers on cores 6 & 7. Basicly this means all games instances will use cores 1 to 7 separately(with l4d2 spread over 2 cores) leaving core 0 for the O/S which even with mysql feeding stats to games it never loads the 0 core to high.
The game instances run fine tf2 sending 66 fps to clients when full dropping to 50 fps on badly optimized maps and heavy action but that is still much better than some gsp's would ever give you. Also I rebuilt the kernel to 1000mghz which gives a bit more bang for your buck.

We are however buying a new raq to compliment this one with similar spec which will give us room to allow a few map & game developers something to play with which is why I need to lock the user down so they don't load any other games instances that maybe on the same raq.
I do not care what you have unless you correct your stupidity. This means spell everything out instead of stating your own custom acyronyms. It is not raq it is rack, r-a-c-k. It is not mghz, it is MHz or megahertz. Also is not gsp, it is graphical processors. There are others specs I prefer having it spelled out correctly, but I am not going to waste my time to fix those when someone can not put in the time to post them correctly.

My mind has already made up and one game being served on one server--period. You do not like that tough. The reason is because games load computers differently than a web server or a database server. Also games are written poor, so there will be more crashes. For the amount of games you are serving should relate the amount of servers or systems. This means you will need at least 8 servers. Having this amount of servers will divide up the connection load and also make the servers be more responsive.

A on 1 U rack for a game server is too small. It is too small even for VMware because there is not enough room to move the heat. 80 TDP means nothing on how much heat it produces or how much power it will consume. Also 15000 RPM drives produces a lot of heat, so again a 1 U rack is too small to house two 3 GHz quad core processors and two 15000 RPM drives. Sure Dell may provide a 1 U server with a dual socket 3 GHz processor, but it does not mean you should buy it.

How I would do it is the following for all eight servers.

4 U Rack case
AMD Phenom II X2 555 BE
2 GB DDR3-1066 ECC
(2) SATA or SAS HD in RAID-1 [OS]
(4) SATA or SAS HD in RAID-10 or RAID-5 with hot spare [game data]
(2) 1 Gb NIC

One NIC will be used for the WAN or Internet and the other is connected to a LAMP server. You just need to two IP address. One for the web server and other for the game servers. Each game server can be called from a subdomain, so one domain name is only used. By having eight servers, I can clean, repair, and upgrade the systems separately. This is difference between my setup and yours because you have gamers being mad and waiting for the server to be up. On my setup, gamers go on to my other servers while I am doing maintenance.

You probably figure you only need a T3-45 connection for the bandwidth to the Internet. You will you need at least 100 Mb connection or even better a 200 Mb connection that will be about a OC3. If you want expansion, a OC12 will be better. You may think this bandwidth is over kill, but every connection has overhead. If you count for over 200 connections that will, the bandwidth will literally start crawling even with the biggest bandwidth. It is best to divide up the load into separate servers. I have figure 32 KB per connection with over head, so that totals up to about 8 MB per second from the 212 connections. This means on the worst conditions you need a bandwidth with at least 16 MB per second. Sure one NIC can handle the bandwidth, but not over 200 connections.

If you do setup separate servers, then you do not have to set limits. Also setting limits are soft based, so they will be inaccurate.

You can do it your way, but my way will work better even though my way will cost more.
 
Old 05-16-2010, 12:36 AM   #8
Devilfish
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Original Poster
Rep: Reputation: 0
You obviously don't run a games RACK then do you, why don't you leave it to the GSP (GAMES SERVICE PROVIDERS).
Our 1u raq(oh sorry you cant understand abbreviations, just for you RACK)has run for nearly 2 years with out fault in a data centre where it has NO HEAT ISSUES, if you've ever looked inside a dell or hp rack you would be aware that they design them to deal with heat very well.
We move approximately 4TB to 6TB of data a month purely on games servers and contrary to your predictions they run fine.
We don't run a lamp server all our website and custom maps/content downloads are hosted else where. (this is an additional 1TB of data per month)
Our 1u from dell cost £3k which for our non profit games community was affordable your suggested set-up will cost in the region of 10k on top of that would be the co-location cost, extra ampage for a 4u which would also cost approximately £200-00 per month as opposed to our £75-00 per month.
Also in the 2 years it has run, performance has been exceptional with no maintenance needed, why do you believe we would need to rip hd's out and do maintenance to rebuild it? then there is the question of memory you specify 2 gig, that would barely run 4 games servers let alone 8. What about power redundancy if you psu goes down you lose the lot you might want to add a dual psu.
I've been running games servers for over 5 years from the original cs1.6 upto tf2 & l4d2 for our games community and understand that having a 4u rack with lots of hd's is a luxury not a necessity.

As I said before this is for a non profit games community not a business and its not my job, I do this in my free time for our games community all I wanted was some information on locking a cpu core to a user. You obviously arent here to help as Syg00 has already given me the information I needed and not the lecture on how to run a games server which on all accounts you don't seem to know anyway. You don't know what memory, cpu and hd space is required the only mathematical equation you posted is the bandwidth usage (standard calcs can be found all over the net for Valve based games) which did you take into account that the kernel runs @ 1000MGHZ and the tick rate of tf2 is 66 and l4d2 is only 33, these are the max fps that the games instances can run @ but they affect the bandwidth considerably pushing your suggested 16MB upto 21 possibly 22 MB/s so even that calculation is 30% below required.
 
Old 05-16-2010, 02:59 AM   #9
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by Devilfish View Post
You obviously don't run a games RACK then do you, why don't you leave it to the GSP (GAMES SERVICE PROVIDERS).
Our 1u raq(oh sorry you cant understand abbreviations, just for you RACK)has run for nearly 2 years with out fault in a data centre where it has NO HEAT ISSUES, if you've ever looked inside a dell or hp rack you would be aware that they design them to deal with heat very well.
We move approximately 4TB to 6TB of data a month purely on games servers and contrary to your predictions they run fine.
We don't run a lamp server all our website and custom maps/content downloads are hosted else where. (this is an additional 1TB of data per month)
Our 1u from dell cost £3k which for our non profit games community was affordable your suggested set-up will cost in the region of 10k on top of that would be the co-location cost, extra ampage for a 4u which would also cost approximately £200-00 per month as opposed to our £75-00 per month.
Also in the 2 years it has run, performance has been exceptional with no maintenance needed, why do you believe we would need to rip hd's out and do maintenance to rebuild it? then there is the question of memory you specify 2 gig, that would barely run 4 games servers let alone 8. What about power redundancy if you psu goes down you lose the lot you might want to add a dual psu.
I've been running games servers for over 5 years from the original cs1.6 upto tf2 & l4d2 for our games community and understand that having a 4u rack with lots of hd's is a luxury not a necessity.

As I said before this is for a non profit games community not a business and its not my job, I do this in my free time for our games community all I wanted was some information on locking a cpu core to a user. You obviously arent here to help as Syg00 has already given me the information I needed and not the lecture on how to run a games server which on all accounts you don't seem to know anyway. You don't know what memory, cpu and hd space is required the only mathematical equation you posted is the bandwidth usage (standard calcs can be found all over the net for Valve based games) which did you take into account that the kernel runs @ 1000MGHZ and the tick rate of tf2 is 66 and l4d2 is only 33, these are the max fps that the games instances can run @ but they affect the bandwidth considerably pushing your suggested 16MB upto 21 possibly 22 MB/s so even that calculation is 30% below required.
A 4 U rack will not consume more power. It is just size. It will take more room on the rack shelf which can be costly if you care about space in a data center.

I have looked at the inside in HP and Dell servers. I just looked at pictures, but they are the same as any other brand that makes servers such as Aberdeen Inc and Silicon Mechanics just to name a few. I do not think that game servers do not need ultra high quality equipment since the software being run is low quality compared to other servers that run high quality software.

The MGHZ is not an industry term. It is more a mis-spell, so again spell it out correctly. Linux has a process tick that is selectable at 100 Hz, 250 Hz, and 1000 Hz, so MGHZ is not in there. If you select 1000 Hz, your server will spend most of its time handling the programs, so bandwidth will be penalized. Also stop abbreviating the words such as "@" as at and "/s" as "per second". This is not cell phone message or text messaging. I do not care how long you been doing it because it does not show it in your posts.

I did suggest something, but you missed it. It was Linux VServe. You probably skim my posts since you did not read that I said one server to one game. This means one Left 4 Dead on each of the four servers and four Team Fortress 2 on each of the four server for a total of eight servers. My configuration will work. Separate servers are good for cleaning. Using one server will have build up of dust in a year, so you should clean it. That means down time for all eight games. If you setup separate servers, only one server at time will be down. A server room still gets dirty, so you have to clean the servers.
 
Old 05-16-2010, 01:11 PM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Quote:
Originally Posted by Devilfish View Post
You obviously don't run a games RACK then do you, why don't you leave it to the GSP (GAMES SERVICE PROVIDERS).
Our 1u raq(oh sorry you cant understand abbreviations, just for you RACK)has run for nearly 2 years with out fault in a data centre where it has NO HEAT ISSUES, if you've ever looked inside a dell or hp rack you would be aware that they design them to deal with heat very well.
We move approximately 4TB to 6TB of data a month purely on games servers and contrary to your predictions they run fine.
We don't run a lamp server all our website and custom maps/content downloads are hosted else where. (this is an additional 1TB of data per month)<snip>
Quote:
excerpt abbreviation;

abbreviation, in writing, arbitrary shortening of a word, usually by cutting off letters from the end, as in U.S. and Gen. (General). Contraction serves the same purpose but is understood strictly to be the shortening of a word by cutting out letters in the middle, the omission sometimes being indicated by an apostrophe, as in the word don't. Most abbreviations are followed by a period. Usage, however, differs widely, and recently omission of periods has become common, as in NATO and UN. Acronyms are combinations of the first letters/syllables in a group of words to form a new grouping of letters that can be pronounced as a word. A period is never used when apostrophes appear. A list of abbreviations used in this encyclopedia may be found in the prefatory matter.
If you follow technology and wish to use proper terms then to just arbitrarily make up your own will only lead to confusion not solutions. By putting up defenses when someone tries to aid when you misuse terms is just plain wrong. Technical jargon adds to the mix of confusion thus the need to allow one to follow proper terminology not tech speak.

BTW, it's rack, Mhz, Ghz etc: Google is your friend.
 
Old 05-16-2010, 01:55 PM   #11
Devilfish
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by onebuck View Post
Hi,





If you follow technology and wish to use proper terms then to just arbitrarily make up your own will only lead to confusion not solutions. By putting up defenses when someone tries to aid when you misuse terms is just plain wrong. Technical jargon adds to the mix of confusion thus the need to allow one to follow proper terminology not tech speak.

BTW, it's rack, Mhz, Ghz etc: Google is your friend.
My apologies for my abbreviations/miss spelling all I wanted was information.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 08:29 AM
Locking user into /home/user zaimor Linux - Security 10 11-06-2005 06:34 PM
fedora core 4 locking up jonnyblinux Fedora 3 10-30-2005 05:08 PM
locking at high CPU usage charon Linux - Newbie 4 03-10-2004 02:21 AM
SMP machines - locking a processor to one CPU? Bluesuperman Linux - Hardware 2 10-22-2003 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration