We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

SetProcessWorkingSetSizeEx and the 'system' process CPU usage

OrenRozen
OrenRozen asked
on
Medium Priority
664 Views
Last Modified: 2013-12-17
My application, when running in terminal server, takes about 80Mb of ram and more.
The server is 2003 standard 32bit with 2 DualCore CPU's and 4Gb.
I found a way to reduce the amount of working set used by my application with the SetProcessWorkingSetSizeEx method but the more users connecting to the terminal server I noticed that the 'system' process is using 25% of the CPU (100% of one core) after running this method to the level where it 'hurts ' the server performance.

BTW, after running the method, it reduces the size of the WS form 80Mb to 5Mb. Also, I'm running this method every 1 minute.

1. why is that process using the 'system' process?
2. is it possible to reduce the usage of this process?
3. if not, any other way to trim the memory of the application?

Thanks,
Comment
Watch Question

Commented:
I'm not sure we can answer your question without knowing a bit more about your application... what does it do?
Commented:
I'll post the disclaimer that I haven't played in this realm so I'm just guessing but...

You're probably forcing garbage collection to cycle too frequently.  Assuming you're only working with managed memory I presume one could reduce the working set to force gc to run more frequently, keeping the memory footpring smaller but at the cost of a less efficient gc process.  You might use a memory profile tool to be sure you aren't leaking any managed objects, and then you could try tuning the working set size.  I presume as you gradually decrease the working set size you can use perfmon to watch the gc cycles and you'll see the gc frequency increase.  

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
partial solution given
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.