|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CPU Utilization of Another serverHow would I measure the CPU utilization, and perhaps other performance
indicators on one server and make the data available to other servers, sothe applications running on them can make more intelligent processing decisions? Thank you in advance. Hello JMZ,
>How would I measure the CPU utilization, and perhaps other performance Hm, I think that would depend entirely on the details of what you want to >indicators on one server and make the data available to other servers, >sothe >applications running on them can make more intelligent processing >decisions? do... for example, you could use system builtin features like WMI to do this: http://msdn2.microsoft.com/en-us/library/aa389290.aspx A potential drawback of this is that it requires some setup on the systems to be "correct", otherwise it won't work... so if you want to have a bit more control over the process to make it easier for your customers to use, you might want to create your own service that collects the information you need and publish the data using some kind of communication technology. XML Web Services, or .NET Remoting or WCF, whatever seems easiest to you. In this case, don't forget to make things secure - performance measurement information could be pretty interesting to hackers as well... Oliver Sturm Thanks Oliver.
Here's my scenario: I have multiple applications that interact with one Oracle database. I want to ensure one app (the main one, a web app) remains responsive to users while it is being used (i.e. updated, queried) by another application that operates in mostly a batch mode but in real-time, not just after hours. The data that the web app uses comes from the web app users and the other application. I want the batch mode app to intelligently throttle itself to the current resource availability on the database server. Obviously, I want to minimize the overhead of such a mechanism, so I don't want another database connection. Also, the batch mode app executes from an application server cluster, not just a single server. I have never tried anything like this before, but I envision a small service that runs on the database server that measures the indicators I am interested in (perhaps just memory and cpu utilization) and pushes the data to a list of other servers on a recurring schedule, such as every 30 to 60 seconds. I don't know if that is too often to minimize overhead or not, because I do not know the fastest and least resource-intensive way of gathering the data. I want the data to be small and quickly read, so I don't want to use XML. Data this simple doesn't need anything like that IMHO. And all the machines will be behind the DMZ. What do you think? Thanks. Show quote "Oliver Sturm" wrote: > Hello JMZ, > > >How would I measure the CPU utilization, and perhaps other performance > >indicators on one server and make the data available to other servers, > >sothe > >applications running on them can make more intelligent processing > >decisions? > > Hm, I think that would depend entirely on the details of what you want to > do... for example, you could use system builtin features like WMI to do > this: > > http://msdn2.microsoft.com/en-us/library/aa389290.aspx > > A potential drawback of this is that it requires some setup on the systems > to be "correct", otherwise it won't work... so if you want to have a bit > more control over the process to make it easier for your customers to use, > you might want to create your own service that collects the information > you need and publish the data using some kind of communication technology. > XML Web Services, or .NET Remoting or WCF, whatever seems easiest to you. > In this case, don't forget to make things secure - performance measurement > information could be pretty interesting to hackers as well... > > > Oliver Sturm > -- > http://www.sturmnet.org/blog > Hello JMZ,
>What do you think? Hehe... what do I think about what? Your idea in itself? May be a good one, provided your situation warrants the work that'll have to go into that implementation... it won't be easy to tune the throttling in exactly the right way so that the benefit is like you imagine it to be. I could also imagine that the granularity you're thinking of may be far to large (30-60 seconds) - all this can only be shown in practical tests, which will take long and may come to the conclusion that the whole idea doesn't work after all. It may be better to rely on Windows' own scheduling of process priorities instead of trying to put another system on top of that. In general, before I'd ever think about something like this, I'd look out for hard evidence that shows how the processes "collide" under a certain degree of stress. I'd also want to be really sure that the problem cannot simply be solved by upgrading the hardware. I'd do a huge amount of tests to confirm all those things, and I'm pretty sure it would turn out that a hardware upgrade or some dedicated configuration work on the server is a better idea than my own process priority manipulation service. Finally, if you decide to go for your idea after all, I don't believe you need to be careful about using XML or not - a few bytes more or less on the network, every few seconds, will not make any difference to success or failure of your scheme. Oliver Sturm Yes, we already experienced the collision of the applications and have had to
turn to less than desirable actions. And yes hardware upgrades and 64 bit Oracle on 64 bit Windows both would help immensely, but alas, neither will come any time soon because our budget and other infrastructure limitations will not allow it. In a nutshell, we are stuck with this situation for the time being, and budgets are going to keep shrinking. So the more automation we can employ, the better. As far as XML goes, it isn't the size that I'm worried about the most, but instantiating an XML reader to read the data and an XML writer to create the data is more than is really necessary. The same information can be encoded in a few bytes and should not require any special writers/readers to process it, that's all. I don't want to steal any more bandwidth, memory, or cpu cycles than absolutely necessary. Thanks. Show quote "Oliver Sturm" wrote: > Hello JMZ, > > >What do you think? > > Hehe... what do I think about what? Your idea in itself? May be a good > one, provided your situation warrants the work that'll have to go into > that implementation... it won't be easy to tune the throttling in exactly > the right way so that the benefit is like you imagine it to be. I could > also imagine that the granularity you're thinking of may be far to large > (30-60 seconds) - all this can only be shown in practical tests, which > will take long and may come to the conclusion that the whole idea doesn't > work after all. > > It may be better to rely on Windows' own scheduling of process priorities > instead of trying to put another system on top of that. In general, before > I'd ever think about something like this, I'd look out for hard evidence > that shows how the processes "collide" under a certain degree of stress. > I'd also want to be really sure that the problem cannot simply be solved > by upgrading the hardware. I'd do a huge amount of tests to confirm all > those things, and I'm pretty sure it would turn out that a hardware > upgrade or some dedicated configuration work on the server is a better > idea than my own process priority manipulation service. > > Finally, if you decide to go for your idea after all, I don't believe you > need to be careful about using XML or not - a few bytes more or less on > the network, every few seconds, will not make any difference to success or > failure of your scheme. > > > Oliver Sturm > -- > http://www.sturmnet.org/blog > |
|||||||||||||||||||||||