VMware Cloud Community
bclark_hyperic
Enthusiast
Enthusiast

Swap Free measurement on Windows 2008

Hello,

I am using Hyperic HQ 4.0.2 to monitor a Windows 2008 64-bit server. Everything works fine, but I see some anomalies in some of the metric measurements. One of those is the "Swap Free" metric.

I have a 95 GB paging file configured in Windows. However, Hyperic is reporting that I have a "Swap Free" of 104.2 GB. How is this possible?

This is especially confusing in that my "Swap Used" metric is 63.6 GB. I would think that in order to have Swap Free and Swap Used of these amounts, I'd have to have at least a 167.8 GB paging file.

Anyone have any ideas? Is this a bug?

Thanks,
Brian
0 Kudos
5 Replies
dougm_hyperic
VMware Employee
VMware Employee

Hi Brian,

With a "Custom size" page file, there's an "Initial size" and "Maximum size". I think it might be that the api we use, GlobalMemoryStatusEx, returns the Max. Looks like there's a newer api, GetPerformanceInfo, as of 2003 server, which has:

"CommitLimit
The current maximum number of pages that can be committed by the system without extending the paging file(s)."

Assuming that'd be the "Intial size". I'll look into it more, but in the meantime can you check your Virtual Memory settings to see if this might be the case?
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

That's correct, I have a "Custom size" paging file configured. I have it set to an initial size of 97000 and a maximum size of 100000.

As far as using an API that returns the Max size, wouldn't that be used for the Swap Total metric in Hyperic? If so, what would be the difference between Swap Total and Swap Free?

I don't know if CommitLimit is what we would be looking for here, as that is measured in number of pages instead of in bytes (or KB).

Thanks,
Brian
0 Kudos
dougm_hyperic
VMware Employee
VMware Employee

Right, here's what we use currently:

http://msdn.microsoft.com/en-us/library/aa366770(VS.85).aspx
ullTotalPageFile -> Swap Total
ullAvailPageFile -> Swap Free
ullTotalPageFile - ullAvailPageFile -> Swap Used

Is Swap Total reporting your Max size correctly? You can also check (in the agent\pdk directory) with:
java -jar sigar.jar free

We can do CommitLimit * PageSize to get the value in bytes, but still haven't had a chance to look into that yet.
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

Doug,

It looks like you are measuring exactly what Windows Task Manager is measuring. This is normally a good thing. My problem is that neither makes sense to me.

It looks to me that what Windows is returning to you with ullTotalPageFile is a combination of all virtual and physical memory--not just virtual memory as is implied in a "Total Page File" metric. My confusion is directly from the fact that I have a 97GB custom page file configured but a "total page file" measurement much greater than that.

See the attached screenshots. Everything in Hyperic seems to match up with the Task Manager information (see under the "System" section in task_mgr.png). The page file measurement there states that it is 65,205MB / 161,435MB. The 65GB is roughly what Hyperic is showing as Swap Used. The 161GB is roughly what Hyperic is showing as Swap Total. (The screenshots were taken several minutes apart which could explain the small differences).

What I assumed that "Swap Free" meant was something more like what is described in ullAvailVirtual. I assumed that "Swap Total" was more like what is described in ullTotalVirtual. I see that the descriptions of both of these include only the "user-mode portion of the virtual address space of the calling process", so that may not work either, as I would like to see system-level information.

I'm not sure that there is much here you can take to improve your product. It seems like you are reporting what Windows is giving you, and you can't do much more than that. The CommitLimit * PageSize may help, but I am not sure what that provides that is different than what is currently being reported.

Thanks for taking the time to look into this.

Brian
0 Kudos
bclark_hyperic
Enthusiast
Enthusiast

For some reason, the attached png files didn't "stick" to my last post. Here they are again.
0 Kudos