Results 1 to 9 of 9
Thread: Limit CPU/RAM per account
-
08-28-2007, 07:38 PM #1Junior Guru
- Join Date
- Aug 2004
- Posts
- 242
Limit CPU/RAM per account
How do you limit CPU/RAM per account on a shared web server without virtualization? Something like what Dreamhost is now offering, for instance for user "john", assign 256MB of RAM and 10% of CPU. Without Virtuozzo and friends. Any idea?
-
08-28-2007, 08:22 PM #2Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
What you're looking for is ulimit, although it's my understanding that Dreamhost has a bunch of custom scripts to keep everything in check.
Manpage:
http://bama.ua.edu/cgi-bin/man-cgi?ulimit+1RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
08-29-2007, 06:18 AM #3Junior Guru
- Join Date
- Aug 2004
- Posts
- 242
-
08-29-2007, 07:10 AM #4Web Hosting Evangelist
- Join Date
- Jun 2006
- Location
- Cluj Napoca
- Posts
- 469
You cannot limit CPU/RAM per account. An account can get your apache to spawn 1000 childs and you cannot limit that. The same is for mysql. If you are only looking to limit the resources that a user can use when executing a php or other scripts you can do that with ulimit but I am not shure if that is what you want.
-
08-29-2007, 04:17 PM #5Greece
- Join Date
- Jan 2004
- Location
- Greece
- Posts
- 2,211
You can limit it but you have to run php as fastcgi and not as apache module.
-
08-29-2007, 04:35 PM #6Disabled
- Join Date
- Aug 2007
- Location
- South East
- Posts
- 26
I didn't know you chould do that, thanks!
-
08-30-2007, 04:08 AM #7Web Hosting Evangelist
- Join Date
- Jun 2006
- Location
- Cluj Napoca
- Posts
- 469
-
08-30-2007, 05:05 AM #8Greece
- Join Date
- Jan 2004
- Location
- Greece
- Posts
- 2,211
Of course serving images works, else you would see the images in my website
-
08-30-2007, 05:14 AM #9Web Hosting Evangelist
- Join Date
- Jun 2006
- Location
- Cluj Napoca
- Posts
- 469