0

I have a Linux VM that has 8 GB RAM. This is a screenshot of htop which includes all system information (tasks,services). There's no application using too much RAM when looking at the PIDs, but the total RAM usage is 6.26 GB. Why is the virtualized part of these tasks too high? e.g: mssql-server (5711 M VIRT , 511M RES) I already have configured mssql server while setting max.memorylimitmb to 3072 MB, but still my server is using too much RAM.

htop


I have added screenshot when typed top o %MEM -n1

top p %MEM -n1

inxi -t m20

free -m

Normal values after reboot , When I restarted server , everything is fine total ram consuming 1.34 GB , but after 10-15 hours automatically ram using increases to 6 GB as you can see pictures I shared before..

inxi -t m20 after reboot

inxi -t m20 | grep apache2 after reboot

  • 2
    Can you please paste the text output (rather than a screenshot) of top o %MEM -n1. It's way easier to read than this. – popey Feb 14 '23 at 14:15
  • 1
    Every 2 of those 0.5% listed is 1% of your memory being used and those do add up. Your screen cut off is too short to see how many of those are there. Please edit your question and also add the output of inxi -t m20 which will list the top 20 memory using applications. I suspect that your web server (Apache / www-data) that you are running is using up most of your memory. – Terrance Feb 14 '23 at 15:15
  • I have added screenshot for inxi -t m20 , Used/Total : 6723,9/7976,1 MB , There's no task consuming too much Ram, where's the problem ? Why my used ram is so high? What's my fault? – Onur İn Feb 14 '23 at 15:41
  • MS SQL Server will consume all the RAM it can, and you are running SQLServer as evidenced by your command. Additionally, Apache2 is not memory-light either and running multiple SQL systems (mysql, SQL Server, etc.) and also dotnet applications at the same time is likely to eat your memory – Thomas Ward Feb 14 '23 at 15:47
  • @ThomasWard Dear Thomas , All of services running on server consuming 1.5 GB ram as you can see in screenshots I shared my question.But why free memory value too low? Sql server - 765 MB ram Mysql - 162 MB ram .Net service 130 MB ram

    But totally used ram value is 6.5 GB , where're the other apps using my ram ?

    – Onur İn Feb 14 '23 at 15:51
  • @Onurİn what's the output of free -m? Chances are it's being held by your cache and buffers and it's able to be given to things that need it regularly. https://www.linuxatemyram.com/ explains that well. – Thomas Ward Feb 14 '23 at 15:52
  • @ThomasWard I have added output you asked , available ram value is only 1340 MB – Onur İn Feb 14 '23 at 15:55
  • I also tried swapoff -a and swapon -a but nothing changed.. – Onur İn Feb 14 '23 at 15:56
  • @Onurİn swapoff won't help you here. You literally have no memory available, it's likely being eaten by other processes, SQL Server, Apache, and MySQL are examples. Note that on average, MS SQL Server will eat up to 4GB just by idling and that's why it requires a minimum of 4GB to function. I'm guessing that MSSQL is likely one of your cuplrits here. If you need all this SQL and web interface functionality, you need to upgrade the RAM on your machine entirely. – Thomas Ward Feb 14 '23 at 16:13
  • @ThomasWard Now I stopped mssql-server by typing systemctl stop mssql-server , but free ram value increased 1 GB . Now totally used ram 5.55 GB ram. – Onur İn Feb 14 '23 at 16:35
  • I couldn't find the other apps using my ram . – Onur İn Feb 14 '23 at 16:38
  • Anybody can help? – Onur İn Feb 15 '23 at 11:47
  • Honestly, I think it is Apache2 using up your memory. Minimum requirements are at least 4GB of RAM. http://docs.cloudstack.apache.org/en/latest/installguide/overview/_requirements.html You can still use inxi to see all of yours. On your top command that you posted shows 160 tasks, so to show them all use inxi -t m160 and to view all of one specific app, like Apache2, you can use inxi -t m160 | grep -i apache to list only Apache stuff. I only say this because in your screenshots you keep adding we are only seeing partial stuff. – Terrance Feb 15 '23 at 14:03
  • I also recommend you see: https://askubuntu.com/questions/53264/how-do-you-find-out-which-program-is-using-too-much-memory One other thing, I do work around servers everyday, and 8GB is a very low amount to ever have in a server that is serving multiple things. – Terrance Feb 15 '23 at 14:03
  • @Terrance Dear Terrance , when I restarted server everything is fine total ram used is 1.34 GB , after 10-15 hours this problem occurs suddenly , total ram increases to 6 GB . All application and services are same. Is this caching mechanism or different something? Also I added a picture indicates ram value used by apache2.Apache2 only using 300-400 mb ram totally. I don't know what should I do , I'm confused.. – Onur İn Feb 15 '23 at 16:10

0 Answers0