I have a hyperV VM of CentOS7 64bit with 8GB of RAM. It's accessed via VESTA and is running a Mailwizz implementation. So I know there is a lot of services running there.
My problem is that for some reason, it cannot go beyond 2GB in memory and therefore accumulates a large swap file. I'm not sure why it's like that.
I read some forums on proper memory allocation and I was able to try to use Dynamic Memory but it only got me as far as 3GB and I still got stuck? I know I have a 64bit version of the OS installed so I don't have an idea why it can't move forward.
Any ideas on why my memory usage can't go beyond 2GB?
Thanks in advance!
Stuck on 2GB memory for CentOS7 HyperV
Re: Stuck on 2GB memory for CentOS7 HyperV
No, it sounds like a problem with the hypervisor to me. What is the output from uname -a on your gurst?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Stuck on 2GB memory for CentOS7 HyperV
Here is the output:
Linux anxamobile.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I'd welcome any ideas. I have nowhere else to look.
Linux anxamobile.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I'd welcome any ideas. I have nowhere else to look.
Re: Stuck on 2GB memory for CentOS7 HyperV
Well that's out of date but it's not massively out of date. I'd check your VM memory settings on the host - make sure the memory is allocated to it - ballooning does not work on guests on hyper-v.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Stuck on 2GB memory for CentOS7 HyperV
Memory is allocated and set as 8192.
I found some ballooning articles a couple of months back. It work slightly but pegged me at 3GB. I guess it might have encountered the same problem I have right now.
Thanks for the comment. You have any more?
I found some ballooning articles a couple of months back. It work slightly but pegged me at 3GB. I guess it might have encountered the same problem I have right now.
Thanks for the comment. You have any more?
Re: Stuck on 2GB memory for CentOS7 HyperV
I have something strange but maybe it's not
From what I understand, Centos7 does indeed see 8GB but says that the free memory is only 282k. The rest are considered buff/cache. I already have 4GB of swap file.
Is this right? Should I be able to utilize all 8GB as my memory and preventing a large swap file?
How can I utilize the shared buff/cache as main memory?
Code: Select all
[root@anxamobile ~]# free
total used free shared buff/cache available
Mem: 8002872 2017632 282172 23216 5703068 5649928
Swap: 4063228 502492 3560736
[root@anxamobile ~]#
Is this right? Should I be able to utilize all 8GB as my memory and preventing a large swap file?
How can I utilize the shared buff/cache as main memory?
Re: Stuck on 2GB memory for CentOS7 HyperV
There's even a website dedicated to this: https://www.linuxatemyram.com/
The 4GB swap file (or partition) you have is allocated statically at boot time. The size of the swap file does not grow or shrink during usage. You are only using some 500MB of it at the moment. Perhaps the kernel decided that those bits of memory that got swapped out are not accessed often enough, and that the memory would be better used for buffers and caching. If you want to adjust how eagerly the kernel swaps to disk, there's a "swappiness" parameter (search for it on the internet for its usage) that you can tune. But unless you have an actual performance problem with how your system swaps, I'd recommend leaving that parameter alone.
The 4GB swap file (or partition) you have is allocated statically at boot time. The size of the swap file does not grow or shrink during usage. You are only using some 500MB of it at the moment. Perhaps the kernel decided that those bits of memory that got swapped out are not accessed often enough, and that the memory would be better used for buffers and caching. If you want to adjust how eagerly the kernel swaps to disk, there's a "swappiness" parameter (search for it on the internet for its usage) that you can tune. But unless you have an actual performance problem with how your system swaps, I'd recommend leaving that parameter alone.