[solved] Physical Memory graph bugged for VM using dynamic
Moderators: Developers, Moderators
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
[solved] Physical Memory graph bugged for VM using dynamic
I am using Windows Server 2008 R2 with Hyper-V to run VMs. I switched a particular VM to dynamic memory (http://technet.microsoft.com/en-us/libr ... 31766.aspx) today and immediately noticed something wrong with the Physical Memory graph. Physical memory was climbing to 6 GB, then 7 GB, then 8 GB, when the maximum for this VM is 5 GB!
The gap in the graph is the time at which dynamic memory was enabled. On the VM, I set the minimum memory to 512 MB and the maximum to 5120 MB. The blue graph should never be above 5.00 G here, and the red graph should be the actual RAM usage.
What I have determined from Hyper-V is that the memory demand for the VM is currently 8.85 GB. This is the amount that the VM is requesting to work with (this particular VM is RAM-hungry and we don't have enough for it). The VM only receives a maximum of 5.00 GB, so it seems that the graph is pulling the values for memory demand and something else instead of the actual capacity and usage values. Perhaps Windows uses nonstandard SNMP paths for these values or the SNMP poller is not dynamic-memory-aware.
I used the 0.8.8a all-in-one Cacti Windows installer.
The gap in the graph is the time at which dynamic memory was enabled. On the VM, I set the minimum memory to 512 MB and the maximum to 5120 MB. The blue graph should never be above 5.00 G here, and the red graph should be the actual RAM usage.
What I have determined from Hyper-V is that the memory demand for the VM is currently 8.85 GB. This is the amount that the VM is requesting to work with (this particular VM is RAM-hungry and we don't have enough for it). The VM only receives a maximum of 5.00 GB, so it seems that the graph is pulling the values for memory demand and something else instead of the actual capacity and usage values. Perhaps Windows uses nonstandard SNMP paths for these values or the SNMP poller is not dynamic-memory-aware.
I used the 0.8.8a all-in-one Cacti Windows installer.
- Attachments
-
- ram.PNG (16.38 KiB) Viewed 5801 times
Re: Physical Memory graph bugged for VM using dynamic memory
Not a Cacti problem.
This appears to be an issue with the way Microsoft decided to implement the counter in its SNMP agent. I'd guess there are more detailed memory counters for hyper-v/guest VMs. Possibly snmp-informant exposes this info or you'll have to write additional scripts to query it via WMI.
This appears to be an issue with the way Microsoft decided to implement the counter in its SNMP agent. I'd guess there are more detailed memory counters for hyper-v/guest VMs. Possibly snmp-informant exposes this info or you'll have to write additional scripts to query it via WMI.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
Thanks for the info, I'll check that out.BSOD2600 wrote:Not a Cacti problem.
This appears to be an issue with the way Microsoft decided to implement the counter in its SNMP agent. I'd guess there are more detailed memory counters for hyper-v/guest VMs. Possibly snmp-informant exposes this info or you'll have to write additional scripts to query it via WMI.
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
I've made a discovery.BSOD2600 wrote:Not a Cacti problem.
This appears to be an issue with the way Microsoft decided to implement the counter in its SNMP agent. I'd guess there are more detailed memory counters for hyper-v/guest VMs. Possibly snmp-informant exposes this info or you'll have to write additional scripts to query it via WMI.
Code: Select all
> snmpwalk -v 2c -c mykey myserver .1.3.6.1.2.1.25.2.3.1
...
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: Physical Memory
HOST-RESOURCES-MIB::hrStorageAllocationUnits.7 = INTEGER: 65536 Bytes
HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 81898
HOST-RESOURCES-MIB::hrStorageUsed.7 = INTEGER: 77557
...
65536 * 81898 = 5367267328 B = 5118.6 MB ~= 5120 MB actual maximum RAM of the VM
65536 * 77557 = 5082775552 B = 4847.3 MB = approximately the current memory usage of the VM
To me, someone with very little knowledge of Cacti and SNMP, this seems to indicate that the values being reported by the Windows SNMP agent are correct. Please correct me if I'm wrong.
Thanks.
Re: Physical Memory graph bugged for VM using dynamic memory
Sure looks correct.joshvazquez wrote:To me, someone with very little knowledge of Cacti and SNMP, this seems to indicate that the values being reported by the Windows SNMP agent are correct. Please correct me if I'm wrong.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
So is Cacti reporting it incorrectly, rrdtool, or something else? How should I troubleshoot this?
Re: Physical Memory graph bugged for VM using dynamic memory
Use a snmp tool like snmpwalk (net-snmp suite) and manually verify the memory sizes being reported. alternatively, you could increase the cacti logging level to medium which should show the raw values returned from the device. then when you're in doubt of the values being displayed in the cacti graph, you'd consult the log file and/or manual snmpwalk.
dynamic memory sounds to me that it would be expected the memory total/used would be constantly changing, which is what the graph reflects.
dynamic memory sounds to me that it would be expected the memory total/used would be constantly changing, which is what the graph reflects.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
Yes, I did this above and determined that the values being reported are correct (which you confirmed).BSOD2600 wrote:Use a snmp tool like snmpwalk (net-snmp suite) and manually verify the memory sizes being reported.
It looks like the wrong index is being polled. Data source 73 (virtual memory) is polling index 5, which is an optical drive. Data source 74 (physical memory) is polling index 6, which is virtual memory. They should be polling indexes 6 and 7 instead.BSOD2600 wrote:alternatively, you could increase the cacti logging level to medium which should show the raw values returned from the device. then when you're in doubt of the values being displayed in the cacti graph, you'd consult the log file and/or manual snmpwalk.
Code: Select all
...DS[73]...ss_host_disk...get used 5, output: 0
...DS[73]...get total 5, output: 0
...DS[74]...get used 6, output: 8818589696
...DS[74]...get total 6, output: 9637658624
Code: Select all
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: K:\
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: Virtual Memory
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: Physical Memory
It should be constantly changing, but the maximum memory of the VM is 5 GB. The total memory of the VM can change from 512 MB to 5 GB, but not any higher.BSOD2600 wrote:dynamic memory sounds to me that it would be expected the memory total/used would be constantly changing, which is what the graph reflects.
Re: Physical Memory graph bugged for VM using dynamic memory
ah-ha, that would explain it.joshvazquez wrote:It looks like the wrong index is being polled. Data source 73 (virtual memory) is polling index 5, which is an optical drive. Data source 74 (physical memory) is polling index 6, which is virtual memory. They should be polling indexes 6 and 7 instead.
What reindexing method do you have currently set? If the indexes change while the OS is up, the only option you have is to set it to Verify All Fields.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
Currently Uptime Goes Backwards.BSOD2600 wrote:ah-ha, that would explain it.joshvazquez wrote:It looks like the wrong index is being polled. Data source 73 (virtual memory) is polling index 5, which is an optical drive. Data source 74 (physical memory) is polling index 6, which is virtual memory. They should be polling indexes 6 and 7 instead.
What reindexing method do you have currently set? If the indexes change while the OS is up, the only option you have is to set it to Verify All Fields.
Shouldn't it get the actual indexes when I delete the graph/data source and recreate them?
Re: Physical Memory graph bugged for VM using dynamic memory
Depends. Often you must manually refresh the indexes (click that green circle next to the data query), otherwise cacti will continue to use cached indexes in the poller cache (it only would refresh them in your case when the uptime changes).
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Fri Aug 03, 2012 5:21 pm
Re: Physical Memory graph bugged for VM using dynamic memory
That seems to have worked. Thanks for your help.BSOD2600 wrote:Depends. Often you must manually refresh the indexes (click that green circle next to the data query), otherwise cacti will continue to use cached indexes in the poller cache (it only would refresh them in your case when the uptime changes).
Re: [solved] Physical Memory graph bugged for VM using dynam
If you change anything on the storage then the indexes change and this messes up your graphs.
I had this problem on Cluster nodes because the Quorum disk moves around the nodes.
It would be a good thing if Cacti can be configured to update the SNMP cache at regular moments.
I had this problem on Cluster nodes because the Quorum disk moves around the nodes.
It would be a good thing if Cacti can be configured to update the SNMP cache at regular moments.
Re: [solved] Physical Memory graph bugged for VM using dynam
Change the reindex method to verify all fields for the Host MIB disk query on that device.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests