should I add ram or CPU?

I've recently setup alerts in solarwinds ot alert me when CPU is above 90% for five minutes. I'm getting regular alerts on several servers now. I know that if you add ram that it can decrease the CPU load. So how do I know if I should add ram or more cpu? These are all virtual servers so I have the option of either.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should find the source of the CPU activity first.
- There is no point in adding more CPU or RAM if the source is process that can use only one CPU.
- If the source is some process that can use multiple CPUs, then add CPU.
- If the system does not have enough memory and is swapping, then you can add CPU but it would be much faster if you add more RAM.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris MillardCommented:
Do you have the correct number of CPU cores set for your virtual servers?
rushtoshankarSr Manager Software DevelopmentCommented:
first check which process/application uses more CPU. Then find out if that process is doing heavy disk access (check IO usage).

If IO usage is high, there might more swapping back and forth. So try adding more RAM.
If IO usage is normal, try adding the CPU but, if the application is not capable of using multiple CPU then it is of no use.
Even after adding the CPU, if you see more usage, then the application might be consuming more CPU without doing anything.
Put Your Flow Data to Work

SolarWinds® Flow Tool Bundle combines three easy-to-download, easy-to-use flow analysis tools that can help you quickly distribute, test, and configure your flow traffic.

knfitzAuthor Commented:
How do I find out if the process can use more than one cpu?
knfitzAuthor Commented:
How do I find out if the system is using more swapping? would I look to see if it's using all the ram?
Chris MillardCommented:
If you're using Hyper-V for example, then for each virtual server, you can specify in the settings how many CPU Cores that server will use - and by default, it sets just the one.
knfitzAuthor Commented:
OK, I've setup a new disk I/O monitor. How high is too high for Disk I/O and therefore would tell me that I'm doing alot of swapping?
rushtoshankarSr Manager Software DevelopmentCommented:
In most cases, if you see the disk usage more than 70% all the time you can consider adding more RAM to your system/virtual server. Less than this doesn't mean that it is good. If it is consistent access without break you need to think of upgrading the RAM.

Also, disk access doesn't directly relate to processor usage unless it is for swapping. There are few more things you can check to find out if any process is doing more swapping.

here is a Microsoft documentation on checking memory
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IT Administration

From novice to tech pro — start learning today.