mdzidic / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
Other
0 stars 0 forks source link

Free memory for unlimited memory VPS is wrong #207

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1.
Create a VPS with unlimited memory
2.
Load on the physical machine is 3.5Gb out of 4Gb
3.
Load on the VPS is 100Mb

Actual result:
VPS Memory load 100Mb of 4Gb / !! 3.9Gb free !! 
(the whole server memory minus the VPS memory load)

Expected result:
VPS Memory load 100Mb of 4Gb / !! 500Mb free !!
(only the whole FREE server memory since you cannot use more than you have 
currently available)

Version of the product:
1.6 r766    

Server OS:
CentOS release 5.5 (Final)

Original issue reported on code.google.com by vlad.nedelcu on 9 Nov 2010 at 11:33

GoogleCodeExporter commented 9 years ago
This is the way virtualization works. You can check the RAM using "top" or 
"free -m" utilities inside container. You'll see the same numbers.

Free memory calculations are not so simple as it seems. If you see that 3.5Gb 
out of 4Gb on physical machine, this doesn't mean you can allocate not more 
than 500 Mb. Often free memory size is very small on active machine due to 
cache usage. Memory allocated for buffers/cache can be freed if needed.

Anyway I'm not sure if it possible to change something here. Because in other 
case free memory reported by "top", "free" or other tool inside container will 
be different.

Original comment by sibprogrammer on 9 Nov 2010 at 2:15

GoogleCodeExporter commented 9 years ago
I know that "free" reports the same thing, but i figured it's better to have 
something closer to the real value of the memory you can actually use.
If it's not possible to change it or it's too difficult, just leave it like it 
is. It's a too small issue to worth all the troubles

Original comment by vlad.nedelcu on 9 Nov 2010 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by sibprogrammer on 12 Nov 2010 at 4:39