• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 899
  • Last Modified:

Shutdown a rogue process in Citrix

I manage a citrix farm and 1 program is occasionally consuming 100% of the CPU. The program is used by most users of the server but only 1 bad process instance brings whole server to a crawl.
My question is how do I throttle or terminate a process that is consuming 100% of the CPU I know the name of the exe file too if that helps?

Cheers
Damien
0
ITAS01
Asked:
ITAS01
  • 8
  • 7
  • 2
  • +1
1 Solution
 
Carl WebsterCommented:
What is the EXE?
0
 
ITAS01Author Commented:
JIWA.exe it is a SME ERP system that is not always stable. I think currently being rewritten in .NET

Cheers
Damien
0
 
KrAzYCommented:
Do you monitor your servers and if so with what?  Is it that you want something to kill it for you or you just want to know when it is happening so you can check and then kill it?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Dirk KotteSECommented:
you can use the CPU-optimization-feature to reduce problems resulting from Application-cpu-Spikes.
Also if you use published apps you can reduce the application priority while configuring the app.
0
 
ITAS01Author Commented:
I don't wont to reduce the priority as it is their main ERP program but occasionally 1 instance will spike when the program is left idle and consume 100% CPU. So yes would either like to be notified and / or kill Process that stays at 100% for more than 60 seconds.

Cheers
Damien
0
 
KrAzYCommented:
Do you have a monitoring solution in place now (ex. SCOM)?
0
 
ITAS01Author Commented:
No? Any decent ones you can recommend? I guess monitoring will tell me but I also want a solution to fix without manual intervention as well?
0
 
KrAzYCommented:
Microsoft SCOM is an Enterprise based monitoring solution.  I'm not sure on the size of your environment, but it may be to complex/expensive.  Depending on what version of XenApp you're running I believe you can use EdgeSight "light" for free which replaced Resource Manager.  I don't know if it has the ability to monitor or alert, but it is something you could look at.

As for no manual intervention... I'm not sure if I have a good solution for that.  I guess it could be scripted, but I'm not sure if I could whip something up that would be 100% accurate in killing a rogue processs.
0
 
ITAS01Author Commented:
KrAzY
Thanks for you input. But this requirement is nothing new just suprised there isnt a solution.
How do you manage a rogue process that starts peaking at 100% and stays that way until
1- Users say server is going slow
2- Administrator logs in an kills process manually

Cheers
Damien
0
 
KrAzYCommented:
This is a tuff one.  The correct answer is to have the software company/developer fix their application ;-), but as we know that rarely happens.  Sometimes you can get lucky with multiple core systems where one rogue process can only consume one core (assuming single threaded).  Granted still not good, but the other users can use the cores not consumed by the rogue process.  It really depends on the applications, amount of servers, amount of cores per server, etc but on a four core system you could get away with the occassional rogue process.

After re-reading though... are you running 1 core systems (physical or virtual)?

0
 
ITAS01Author Commented:
VMWARE ESX 4 - I only use a single vCPU as most discussion including my training course suggest that a single vCPU is better and let ESC CPU scheduler handle the sharing.

LOL the ERP vender will be releasing a .NET version which will hopefully stop memory leak and CPU spike but until then I am amazed that there isnt a simple solution for automatically shutting down a rogue process?

Cheers
Damien
0
 
KrAzYCommented:
My guess is that it is hard to determine what is rogue.  How can a monitor know that a process taking 100% is rogue.  Maybe a process is actually using 100% for minutes because it is processing a large "job".

You've probably come to the conclusion that a process from this application at 100% for x minutes is actually rogue which again is probably hard for a monitor to determine.

I don't know what type of hardware you're running, but I would never suggest a single vCPU for a XenApp/Terminal Server environment.  Windows Server/Terminal Services is inherently a multi-user, multi-threaded, multi-process environment.

As for "let ESX CPU scheduler handle the sharing", I'm not sure if that makes sense. For example if you have a 2 CPU system (Core or Physical) and 4 VMs @ 1 vCPU then the scheduler would determine when to give 2 of the VMs "rights" to use the CPU (i.e. switch back and forth).  That doesn't help with what is happening within the OS.  As I state below I believe Windows is more efficient when it has more CPUs.

I would at minimum suggest a 2 vCPU setup.  More than 2 is debatable.  If you're running newer hardware Intel Nehalem or newer then possibly 4 vCPU.

I'd suggest it on W2K3 and even more on W2K8.  I believe Windows if more efficient with multiple cores since multiple cores have been around for 4/5+ years so it is built with that in mind.

It doesn't really answer you question... although I would suggest a multiple vCPU setup.
0
 
ITAS01Author Commented:
KrAzY
My VMWARE 4 classroom was full of professionals and we had about an hour discussion on this as most where of the opinion of 2 vCPU but it can lead to racing and scheduling problems for other VMWARE machines and has in some instances lead to poorer performance of the VMWARE machine. Anyway a rogue process could be easily defined as a process taking X% of CPU for X seconds and needs either throttling or temrminating.

Cheers
Damien
0
 
KrAzYCommented:
I would suggest reading this... I think you have to sign up to dowload the white paper:

http://projectvrc.nl/index.php?option=com_docman&task=doc_details&gid=11&Itemid=

Personal opinion is to raise vCPU and scale back the hosts.  As for killing a process after taking X% of CPU for X seconds, I don't think I have a solution except for dkotte's suggesting about implementing the "fair scheduling" built into XenApp which can be tweaked via registry keys.
0
 
ITAS01Author Commented:
Hmm have to register to get document.. I'd love to read but hate registering :)

Dkotte can you provide more information on this please?
0
 
KrAzYCommented:
They produce some good whitepapers... I hear ya though.  Hate signing up for stuff, but I did in this case.

I"ll provide this:
http://support.citrix.com/proddocs/index.jsp?topic=/xenapp5fp-w2k8/ps-maintain-enable-cpu-ut-man-v2.html

http://support.citrix.com/article/CTX106021

0
 
Dirk KotteSECommented:
you need information to the CPU-optimization-feature ?
0
 
Carl WebsterCommented:
I disagree.  You need to sign-up for the free Project Virtual Reality Check white-papers.  They are they #1 experts in this area of how many vCPUs and RAM to assign to VMs for the 3 main hypervisors.  I would highly recommend you read and digest their independent work.

In case you are wondering, VMware, Microsoft and Citrix all have standardized on the testing methodology used by PVRC and make changes to their products based on issues found and raised by PVRC.

http://projectvrc.nl/
0
 
ITAS01Author Commented:
Didn't really solve my problem but some good performance tips in article reference.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 7
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now