Discussion:
Limiting OS resources on Linux on per process basis
(too old to reply)
tech_geek
2009-01-06 22:26:48 UTC
Permalink
Hi guys,

Is there a tool or product which will allow us to restrict CPU resources on
a linux box for a set of processes. For example, say I have 5 different set
of databases on a linux server, is there a way to guarantee that each
database instance at least gets 10% of CPU and not more than 20% of the
available CPU resources. Any help or pointers to help would be appreciated.

Thanks.
Johannes Bauer
2009-01-06 22:50:50 UTC
Permalink
Post by tech_geek
Is there a tool or product which will allow us to restrict CPU resources
on a linux box for a set of processes. For example, say I have 5
different set of databases on a linux server, is there a way to
guarantee that each database instance at least gets 10% of CPU and not
more than 20% of the available CPU resources. Any help or pointers to
help would be appreciated.
So if the CPU is only processing one single task that should be
scheduled 20% of the time and the OS should idle the remaining 80% of
the time? Sounds pretty braindead to me, but if that's your premise: I
suppose you'd have to implement that yourself.

If you rethink the goals you're trying to achieve you might be able to
create something using "nice" values or RTAI - depending on what your
exact requirements are.

Regards,
Johannes
--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
-- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
<48d8bf1d$0$7510$***@news.sunrise.ch>
tech_geek
2009-01-06 22:57:31 UTC
Permalink
Post by Johannes Bauer
Post by tech_geek
Is there a tool or product which will allow us to restrict CPU resources
on a linux box for a set of processes. For example, say I have 5
different set of databases on a linux server, is there a way to
guarantee that each database instance at least gets 10% of CPU and not
more than 20% of the available CPU resources. Any help or pointers to
help would be appreciated.
So if the CPU is only processing one single task that should be
scheduled 20% of the time and the OS should idle the remaining 80% of
the time? Sounds pretty braindead to me, but if that's your premise: I
suppose you'd have to implement that yourself.
If you rethink the goals you're trying to achieve you might be able to
create something using "nice" values or RTAI - depending on what your
exact requirements are.
Regards,
Johannes
--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
-- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
Hi Johannes,

Thanks for the response. May be I was not clear in outlining my
requirements. The main objective/intent is to ensure that a database on a
server will at least 10% of CPU resources for its use and also to prevent a
single database on the server hogging all the available CPU and thus
bringing other databases's processing to its knees. Hope this makes sense.
Long time, there used to a tool as SRVM in Solaris world - which used to
allow similar resource limitations. I was wondering to see if similar
product or utility exists for Linux world.

Thanks again.
david
2009-01-07 03:10:29 UTC
Permalink
On Tue, 06 Jan 2009 22:26:48 +0000, tech_geek rearranged some electrons to
Post by tech_geek
Hi guys,
Is there a tool or product which will allow us to restrict CPU resources
on a linux box for a set of processes. For example, say I have 5
different set of databases on a linux server, is there a way to
guarantee that each database instance at least gets 10% of CPU and not
more than 20% of the available CPU resources. Any help or pointers to
help would be appreciated.
Thanks.
man nice
David Brown
2009-01-07 06:58:41 UTC
Permalink
Post by tech_geek
Hi guys,
Is there a tool or product which will allow us to restrict CPU resources
on a linux box for a set of processes. For example, say I have 5
different set of databases on a linux server, is there a way to
guarantee that each database instance at least gets 10% of CPU and not
more than 20% of the available CPU resources. Any help or pointers to
help would be appreciated.
Thanks.
Have you considered using a something like openvz? It lets you make
separate virtual linux machines, with control over their resources (such
as the cpu time). But unlike virtual server solutions like KVM or
VMWare, in openvz all processes run on the same kernel - there is
therefore very little overhead. It is also much faster to install new
virtual machines - you are not doing a full OS installation, but
something like a sophisticated chroot.

I believe that some of the parts of openvz, such as the "containers" for
process groups, are becoming part of the mainline kernel.
tech_geek
2009-01-10 20:09:44 UTC
Permalink
Hi,

I have configured a virtual machine (guest os being Centos 5.0) with NAT
configuration. The Guest OS has an ip address of 10.0.x.x and my Host
machine has IP address of 192.168.x.x. From my guest os, I am able to see
the outside network - meaning I am able to browse websites. But, I am not
able to access the Guest machine from the host - what can I access my centos
VM from my windows/host using SSH. I am using Sun Virtual Box.

Any help or pointers to help would be appreciated.

thanks

Loading...