Unraid out of memory problems again!!


Recommended Posts

I seem to have nothing but problems with Unraid and have never spent so much time on forums trying to work out what’s going on! It runs out of memory whenever I run a VM and crashes!! Unbelievable for a modern OS to run out of memory, I’ve never had this problem before! Not with Windows, MAC or Ubuntu. The worst of the 2 VM’s in question is windows 10. I’ve reduced the ram allocation to 8GB of the 16GB on the system so that Unraid itself doesn’t freeze! But Windows 10 remains unusable and has out of memory errors when ever I try to do anything major! I was trying to tag and add artwork to my music library and the tagging program crashes with out of memory error, I have the windows swap file now set to 24GB which makes no difference! If I boot into Windows directly it has no issues and all programs work as expected! Does Unraid have any memory management all because it seems like it doesn’t! So fed up with it I’m thinking of junking it and trying FreeNAS and demanding my money back as not fit for purpose!

 

sorry for the rant, I just don’t think it’s acceptable to sell a system with such a fundamental flaw! It’s running latest version, 6.7.1rc1

Link to comment

If you are looking for help, you need to post up the diagnostics file (in a new post) after you experience the problem .   Tools   >>>   Diagnostics

 

Then post up screenshots of how you have configured your VM's.  While I do not run any VM's, it almost sounds like you are saving data files to the RAM disk that Unraid uses to install the operating system on.  As a general rule, all user data storage should point to a directory that begins with /mnt/  as any other directory mount point will not be a physical device! 

Link to comment

as the 8GB from the 16 should be fine for this 1 VM, really may start posting your configurations ...

 

i have 32 GB Ram and running 2 win10 VM´s with each 8 GB Ram and 0 issues.

 

1 VM is my main working desktop, 2nd VM is a Media and Gaming mashine connected to the main TV (either win10 or libreelec as test)

 

they both are installed on an unassigned device, they both have their cores assigned, both have a dedicated gpu assigned.

 

image.thumb.png.e4a5567915aefea1745da51315ffd2af.png

image.png.604ee891ffdc7849a7fe7ec92be0e43c.png

 

parallel there are some dockers running ...

image.png.ff373042aa16c881f9be2a4687376228.png

 

and memory is fine ...

image.png.8e630ed91583f8fe60e9c542fd91b665.png

 

i once had an out of mem issue when my vm´s quitted, but when i looked at it it is a current plex issue here with dvr and using xml epg,

plex will increase its ram usage each day here by 1 gig ... so after some days ... ;) until plex solves its issue i make a daily restart of that docker (cron).

 

since then my RAM stays fine and this system is 24/7 with its vm´s up ... and the vm´s are in use (im currently sitting here on my main one).

 

so just as tipp, when you have it running its a real nice peace of software ... but for getting help its pretty hard to see what is going on in your

user case without the proper infos, specially for the devs etc here wich are also really helpful.

Link to comment

As you can see from above I have some dockers running and yes I had the same issue with Plex, I fixed it by running auto backup every night, which gives me an up to date backup and restarts my dockers each night!

 

Windows is on its own SSD through unassigned devices and has a DVD drive and 500GB hard drive on a passed through SATA controller, also have a USB3 and Firewire card passed through.

 

When windows has this out of memory problem it generally won't shut down properly, so I have to force it. Then it won't restart without re-booting Unraid. Re-booted Unraid 4 times yesterday, hence my frustration.

 

Thanks to anyone who can help, I really like the way Unraid works, the interface etc. so would much rather fix this and stay with it!

Cheers,

Tim

Link to comment
2 hours ago, MothyTim said:

When windows has this out of memory problem it generally won't shut down properly, so I have to force it. Then it won't restart without re-booting Unraid. Re-booted Unraid 4 times yesterday, hence my frustration.

Unraid is designed to run from RAM so in its default configuration it has not paging file.   This means that you want to avoid over-committing RAM at the Unraid level.    There is a plugin that attempts to add Swap file support but I have no idea how successful that is.

 

As a result when Unraid starts up a VM it will allocate all the RAM you have specified for the VM (8GB in this case) plus an overhead for handling the emulation (I tend to allow a generous 1GB for this overhead).   If Unraid cannot allocate that RAM it will not even start the VM.  If Windows is then reporting it has run out of memory it is something at the Windows level going wrong, not the Unraid level.    Have you checked that the Windows system is set up with sufficient Paging File space for the applications being run and that the drives specified have enough space on them?    Once Windows gets into that state I can understand it having trouble shutting down - it tends to do that on physical hardware as well :)

Edited by itimpi
Link to comment

From your screenshots above if you're running your 3 VMs at the same time you allocating 15GB of your 16 available. 1GB for Unraid itself and all the dockers is definitly to little. Without the Ubuntu VM and only the Windows and PBX VM running you shouldn't have any issues if your dockers are setup correctly. 

Link to comment
1 hour ago, saarg said:

Add more memory or run less containers and VM's.

When Linux runs out of memory, it kills off something that uses the memory.

 

Hi, I will when I can afford it, my wife will do her nut if I spend any more on this machine! But It'll be a while as memory is nearly £100 for another 16GB!

Cheers,

Tim

Link to comment
58 minutes ago, itimpi said:

Unraid is designed to run from RAM so in its default configuration it has not paging file.   This means that you want to avoid over-committing RAM at the Unraid level.    There is a plugin that attempts to add Swap file support but I have no idea how successful that is.

 

As a result when Unraid starts up a VM it will allocate all the RAM you have specified for the VM (8GB in this case) plus an overhead for handling the emulation (I tend to allow a generous 1GB for this overhead).   If Unraid cannot allocate that RAM it will not even start the VM.  If Windows is then reporting it has run out of memory it is something at the Windows level going wrong, not the Unraid level.    Have you checked that the Windows system is set up with sufficient Paging File space for the applications being run and that the drives specified have enough space on them?    Once Windows gets into that state I can understand it having trouble shutting down - it tends to do that on physical hardware as well :)

Hi, thanks, yes I tried the swap file plug-in a few weeks back but it didn't help! In fact, it made it more unstable. I then discovered that plex was transcoding to RAM so switched it to the cache drive which fixed the issue with Unraid running out of RAM in normal use. (ie, when Windows isn't running)

 

Ok thanks, hadn't thought about the overhead for emulation! When I'm running Windows the RAM usage seems to stay in the high eighties, at the moment its 88% and CPU stays between 10 and 20% so should be OK? I think it must be something with Windows but its only a problem when running as VM, the paging file is set to 24GB. Windows is on its own 250GB SSD so should have space to spare! If I boot directly into it baremetal then it's fine, yes I realise that it then has 16GB RAM to use. It's like Windows is ignoring the setting to use the swap file!

 

This is my second attempt at running Windows 10 as a VM on Unraid, first go was using a virtual disk on the cache drive and this install had exactly the same problems. So for 2 fresh installs to do the same thing is why I think its an Unraid issue?

 

Cheers,

Tim 

Link to comment
1 hour ago, bastl said:

From your screenshots above if you're running your 3 VMs at the same time you allocating 15GB of your 16 available. 1GB for Unraid itself and all the dockers is definitly to little. Without the Ubuntu VM and only the Windows and PBX VM running you shouldn't have any issues if your dockers are setup correctly. 

Hi, thanks, no I never run all three at the same time! PBX runs all the time and I boot into Windows or Ubuntu depending on need! I have the same PCI devices passed through to both so would cause an issue I think?

 

Interestingly I never seem to get the same out of memory errors when using Ubuntu, but then I probably don't do as memory intensive things in Ubuntu!

Cheers,

Tim

Link to comment

So this morning I came down to find that the server had crashed in the night, wouldn't shut down and had to kill the power! I hate doing that! System is unstable it seems whenever I use Windows, it wasn't running last night, but took a long time to shut down yesterday! Probably should have rebooted Unraid then as it always has a problem after using windows VM. I never had anything like this much trouble when the server was running on Ubuntu and windows was in Virtualbox! I've attached diagnostics from this morning after reboot!

Cheers,

Tim

tower-diagnostics-20190522-0949.zip

Link to comment
On 5/21/2019 at 6:14 AM, MothyTim said:

Hi, sorry everyone it was late and I was frustrated! I also thought I'd attached the diagnostics! So here they are and some screenshots to help!

Thanks,

Tim

 

Screen Shot 2019-05-21 at 11.08.34.png

Screen Shot 2019-05-21 at 11.09.09.png

Screen Shot 2019-05-21 at 11.09.31.png

Screen Shot 2019-05-21 at 11.06.00.png

Screen Shot 2019-05-21 at 11.13.29.png

Screen Shot 2019-05-21 at 11.13.48.png

tower-diagnostics-20190520-1304.zip 114.64 kB · 1 download

You have some strange vdisk and CDROM mappings.  Why is your primary vdisk mapping in the configuration twice?

 

Why are you mapping the vdisk directly to a disk?  Set it to cache disk or other disk in the array or Unassigned Disk device.

 

Once the Windows 10 VM is installed, remove the CDROM mappings.  The drivers are not needed any longer.

 

This is more of what I would expect as a Windows VM mapping.

2082787346_VMMappings.png.026ae1bec5414d712db059a6b17cc638.png

 

Other suggestions:

  • Make VM xml changes.  You have some strange settings.
  • Cut down the CPU usage to: 4/10 and 5/11 for Windows 10 and 2/8 and 3/9 for Ubuntu.  Neither one should require that many CPUs.  Change later if desired once system is stable.
  • Cut down memory to 4 to 6 GB for Windows.  Cut down Ubuntu memory to 4 to 6 GB.  Adjust later once system is stable.  I think you are over committing memory.
  • Install the Tips and Tweaks plugin and adjust the disk caching as suggested.
Edited by dlandon
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.