VMware Cloud Community
irobot888
Contributor
Contributor

ESXTOP (ESXi5) - SWCUR metric

If the SWCUR metric shows memory that has been swapped by VMKernel, is this a rolling average figure, and if so - after what period will it go to zero if there's been no swapping?

Tags (2)
0 Kudos
5 Replies
elgreco81
Expert
Expert

Hi,

The "cur" part indicates that it's showing the current swapping. So if you see a big value there, the normal thing is that your host needs some more ram. If your host has ram available but it's swapping...then something is not going well and troubleshooting should be performed.

Regards,

elgreco81

Please remember to mark as answered this question if you think it is and to reward the persons who helped you giving them the available points accordingly. IT blog in Spanish - http://chubascos.wordpress.com
0 Kudos
elgreco81
Expert
Expert

Hi,

Was my help useful? Please remember to award the available points or give us some feedback if you have further questions.

Thanks,

elgreco81

Please remember to mark as answered this question if you think it is and to reward the persons who helped you giving them the available points accordingly. IT blog in Spanish - http://chubascos.wordpress.com
0 Kudos
irobot888
Contributor
Contributor

Hi Sebastian

Many thanks for your reply. I’m not sure though that SWCUR (despite its name) shows current swapping – rather that swapping has occurred in the past. I think the SWR/s and SWW/s metrics are the ones that show current reading and writing from swap respectively. See these links:

http://www.yellow-bricks.com/2010/05/26/swapping/

http://www.yellow-bricks.com/esxtop/

http://www.vmdamentals.com/?p=204

I have added memory to my hosts due to SWCUR being greater than zero. Do you know when can I expect it to return to zero (assuming I’ve added enough memory), or will it always show as swapping having occurred in the past (until the host is rebooted)?

Thanks in advance

IR8

0 Kudos
elgreco81
Expert
Expert

Hi,

If Duncan (yellow-bricks author) says so...I belive it Smiley Happy I'm a hughe fan of his blog.

I always used that metric as "current"...take a look at this link where it also explains other metrics

http://communities.vmware.com/docs/DOC-9279

But now, I'm also confused... LOL

"Do you know when can I expect it to return to zero"

I wouldn't know...sorry. As far as a knew, when you install new RAM modules you power off the server...I would had guess that SWCUR would be zero by then.

I guess that I have a lot to study yet Smiley Happy Thanks for your help...I'll come back if I found out something new!

  • "SWCUR" (MB)

Current swap usage.

For a VM, it is the current amount of guest physical memory swapped out to the backing store. Note that it is the VMKernel swapping not the guest OS swapping.

It is the sum of swap slots used in the vswp file or system swap, and migration swap. Migration swap is used for a VMotioned VM to hold swapped out memory on the destination host, in case the destination host is under memory pressure.

Q: What does it mean if "SWCUR" of my VM is high?

A: It means the VM's guest physical memory is not resident in machine memory, but on disk. If those memory will not be used in the near future, it is not an issue. Otherwise, those memory will be swapped in for guest's use. In that case, you will see some swap-in activities via "SWR/s", which may hurt the VM's performance.


Please remember to mark as answered this question if you think it is and to reward the persons who helped you giving them the available points accordingly. IT blog in Spanish - http://chubascos.wordpress.com
0 Kudos
elgreco81
Expert
Expert

Found this! Maybe is your answer to the last question (highlighted it in bold). Does it make any sense to you?

  • "SWTGT" (MB)

The expected swap usage. (TGT is short for "target".)

This is an internal counter, which is computed by ESX memory scheduler. Usually, there is no need to worry about this.

Roughly speaking, "SWTGT" is computed based on "SZTGT" and current memory usage, so that the VM can swap appropriate amount of memory. Again, note that it is the VMKernel swapping not the guest swapping. If "SWTGT" is greater than "SWCUR", VMKernel starts swapping immediately, causing more VM memory to be swapped out. If "SWTGT" is less than "SWCUR", VMKernel will stop swapping. Please refer to "Resource Management Guide" for details.

Q: Why is it possible for "SWTGT" to be less than "SWCUR" for a long time?

A: Since swapped memory stays swapped until the VM accesses it, it is possible for "SWTGT" be less than "SWCUR" for a long time.

Please remember to mark as answered this question if you think it is and to reward the persons who helped you giving them the available points accordingly. IT blog in Spanish - http://chubascos.wordpress.com
0 Kudos