Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the best way to find out if my server needs more memory?

I suppose I should use Perfmon, but which counters?

Thanks.

share|improve this question
    
What version of Windows Server 2003? Windows Server 2003 Standard 32-bit can address only about 3.5GB of memory, including video RAM. In order to maximize the memory available to the system and applications, minimize the memory your video card has. Yes, RAM on a video card counts against the addressable memory limits. –  Jonathan J Dec 23 '11 at 18:15
add comment

3 Answers 3

up vote 7 down vote accepted

You really want to see whether you're having a significant number of hard page faults (that is, page faults that have to go to the disk) or not. Watch the "Pages Input / sec" to get a feel for how many hard page faults are occurring. This is your first best indication that you're running low on RAM.

"Page Faults / sec" includes both hard and soft (that is, page faults where the page needed is still in physical memory) faults.

The "Working Set" counter on the "_Total" instance of the "Process" object will show you the total amount of memory used by all processes. Ideally, you'd like this number to be under the amount of physical RAM in the computer.

Edit:

Your question was about memory, but the phrasing raises the question as to whether you're aware of what your specific bottleneck is or not.

You should be watching the "big 4" counters, just as a matter of day-to-day business:

  • Processor - % Processor Time
  • Memory - Pages Input / sec
  • Physical Disk - Avg. Disk Queue Length - For each physical disk in the computer
  • Network - Bytes Total / Sec - For each network interface on the computer

You don't want processor time to be consistently high. Different people will give you different opinions on what you should see. My take is: This is the last thing to upgrade (since it generally means "replace the computer") unless you're seeing consistently high processor time. Even then, it can be cheaper to profile the application and improve the performance that way then to replace the computer (when you consider all the costs associated with replacing the computer).

We've already talked about the memory counter.

The disk queue represents the number of requests waiting on the disk subsystem to have availability. You should monitor each discrete physical disk or RAID volume on the machine as an individual counter. The specifics of a "bad disk queue" number depend on the application. Microsoft SQL Server 2005 and up, for example, will load the disk queue more heavily than other applications because it's trying to maximize the IO bandwidth. In general, though, you want to see this number smaller than 2 unless you know your app. is purposefully loading the queue up.

The network counter indicates the number of bytes sent and received per interval and should be tracked on each discrete netwokr interface as an individul counter. Ideally, you'll scale this counter such that 100% bandwidth is near the top of the graph. You shouldn't see 100% bandwidth utilization on Ethernet, but you might see spikes close to it. If you're seeing consistently high network load it's probably a sign that you could use more / faster network connectivity to the server computer.

Watching these "big 4" counters can give you a great "at a glance" view of where a bottleneck might lie. From that, you can dig down using the "Process" object into individual processes to determine where IO's or network activity is occurring.

share|improve this answer
add comment

How much memory you need is relative to your applications. If performance is slow, than it could be for a variety of reasons (not just memory).

You should set up a number of performance monitors with perfmon and see what happens when users complain that things are "slow."

Is it because the CPU is hitting 100%? Is it because your memory requirements jump? Is your hard disk thrashing?

I wouldn't assume right away that memory is the bottleneck.

share|improve this answer
    
Thanks, but I'm really interested about memory now. I'm aware of the other reasons that an application could be slow, but this is not the case. –  Erick Sasse Jul 7 '09 at 2:18
add comment

You want to look at Avaliable Memory (I think the counter instance is called _TOTAL). If it's going too low, you might want to look at more memory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.