VMware Global Community
Future_Office_s
Contributor
Contributor

RAM Utilizzata dalle vm

Buonasera,

Spero di non aver sbagliato la locazione del post.. in caso scusatemi! Ho un server con vmware vsphere essential attivo con diverse VM che stanno funzionando regolarmente, solo che ho notato una cosa che non mi torna, selezionando le varie VM mi fa vedere l'utilizzo della cpu, della ram e dello storage, come mai ho sempre la ram al massimo? Cioè ad esempio, ho una VM con 4 GB di ram assegnati, se entro nel sistema ne usa circa 2, ma fuori fra le risorse utilizzate sul pannello di vmware esxi, mi fa vedere come se utilizzasse tutti e 4 i GB disponibili.. mi sono accorto che fa questa cosa su quasi tutte le VM che ho in giro.. come mai?? Vedete allegato

 

Grazie mille

0 Kudos
2 Replies
fabio1975
Commander
Commander

Ciao 

Forse ti hanno già risposto ma:

- Quella che vedi dal grafico è la memoria "Consumed Host Memory" che è definito come la quantità di memoria host allocata alla macchina virtuale.

- Mentre dall'host ESXi lo puoi vedere dal valore "active guest memory" che è definita come la quantità di memoria guest attualmente utilizzata dal sistema operativo guest e dalle relative applicazioni e la vedi nella sezione qua sotto indicata

 

fabio1975_0-1683220930582.png

Alcune maggiori indicazioni, anche del fatto perchè la memoria "Consumed Host memory" è sempre al massimo la trovi nelle seguenti indicazioni tratte dal questo documento 

perf-vsphere-memory_management.pdf (vmware.com)

 

Why is consumed host memory usage higher than active guest memory? (p.5)

"The hypervisor knows when to allocate host physical memory for a virtual machine because the first memory access from the virtual machine to a host physical memory will cause a page fault that can be easily captured by the hypervisor. However, it is difficult for the hypervisor to know when to free host physical memory upon virtual machine memory deallocation because the guest operating system free list is generally not publicly accessible. Hence, the hypervisor cannot easily find out the location of the free list and monitor its changes."

So the host allocates memory pages upon their first request from the guest (that's why consumed is less than the configured maximum), but doesn't deallocate them once they are freed in the guest OS (because the host simply doesn't see those guest deallocations). If the guest OS re-uses such previously allocated pages, the host won't allocate more host memory. If the guest OS however allocates different pages, the host will also allocate more memory (up to the point where all configured memory pages for the specific guest have been allocated).

2) How is active guest memory calculated? (p.12)

"At the beginning of each sampling period, the hypervisor intentionally invalidates several randomly selected guest physical pages and starts to monitor the guest accesses to them. At the end of the sampling period, the fraction of actively used memory can be estimated as the fraction of the invalidated pages that are re-accessed by the guest during the epoch".

 

Fabio

Visit vmvirtual.blog
If you're satisfied give me a kudos

0 Kudos
Future_Office_s
Contributor
Contributor

Mi sei stato di super aiuto grazie mille, hai fatto chiarezza! Grazie ancora!

0 Kudos