Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

memory alloc failed: virtualalloc failed. happened when there are a lot of programs running at the same times #652

Closed
b080180d opened this issue Feb 19, 2017 · 25 comments

Comments

@b080180d
Copy link

when i start the windows without running any programs, it works fine. I stop the mining and run several programs at the background. After which, I start to mine again and memory alloc failed. How do I fix this?

I do not wish to close the background programs as I'm doing other stuffs at the same time. Thanks.
capture

@fefsf
Copy link

fefsf commented Feb 19, 2017

You will need to increase the Virtual Memory Size, that should fix it

"Computer Properties / Advanced System Settings / Performance / Advanced / Virtual Memory".

@b080180d
Copy link
Author

how much should i increase? my physical RAM is 8GB. Windows 10 Pro x64

right now is
min allowed: 16 MB
recommended: 1915 MB
currently allocated: 10112 MB

@fefsf
Copy link

fefsf commented Feb 19, 2017

Put it too 16gb

@b080180d
Copy link
Author

thanks!. solved.

@Frowny
Copy link

Frowny commented Jun 5, 2017

Setting virtual memory to 16000 didn’t solve this for me.

@roDIESEL
Copy link

Setting "lock pages into memory - allowed for my user (where I am running the miner)" fixed the problem for me.
Run gpedit.msc:

screenshot_1

then go to Computer Configuration/Windows Settings/Security Settings/User Right Assignment/Lock Pages in memory - double click and add an user (yours)

@imrecsoka
Copy link

Even though i make sure my user is added to the group i seem to get the error after a couple of re-runs.
Example: i mine, then i stop to surf a bit then i mine again and i get this error.
How do you avoid this almost always?

@roDIESEL
Copy link

You must be sure that you have enough space left on your System Drive in order to set such amount of virtual memory. Happened to me once, when my free space on drive C: went below 32 GB (and I had 32 GB virtual memory setup). Until I cleaned my SSD and got something like 36+ free GB space, I was not able to get rid of that annoying error.

@RealityRipple
Copy link

RealityRipple commented Jul 31, 2017

I was having this problem even with lots of free space and RAM, but after a bit of searching, I found a helpful utility, from Microsoft of all people: RAMMap https://docs.microsoft.com/en-us/sysinternals/downloads/rammap.
Just use the Empty menu to clear everything. It might take a few extra minutes before the problem really clears, but it does work eventually.

@MDX3
Copy link

MDX3 commented Aug 28, 2017

Out of curiosity.. I am new to this mining stuff.. do these errors even matter if they pop up then the miner runs anyhow? Is it less efficient due to them or ? I was able to get mine to go away (mostly) with the increase in virtual memory and the group policy edit, so thanks! Just wondering.

@IOnine
Copy link

IOnine commented Sep 20, 2017

Out of curiosity, has anyone had any success in mitigating these messages? I am running pretty smoothly as a whole, but still see these every time I start it up.

@Tsaroz
Copy link

Tsaroz commented Oct 28, 2017

This thread helped me. And I want to add one more step.
The error message also may arise if you are not running the miner with administrative privilege.
Right clicking the miner and clicking Run as Administrator may solve the problem for some (like me).

@ligone
Copy link

ligone commented Nov 13, 2017

Thanks, @Tsaroz

your tip helped me to get rid of the error messages but now my Cryptonight performance has dropped to ~175H/s from ~350H/s

I have 8GB of physical ram, set page file to 20000-30000 and set lock memory pages to everyone and myself

=\

edit0: now it has jumped up to ~285.. it has done this before where the hashrate seems variable somehow
edit1: I closed all the apps I was using (chrome) and then used RAMMAP to empty everything just before starting nicehash. now getting 400+H/s =D happy days

@imrecsoka
Copy link

I would love to know how to get better speeds.
I get about 615 Hahes/second on 1 RX470.
I believe it can be better but i dont know how to achieve this.

@borzaka
Copy link

borzaka commented Nov 22, 2017

To summarize:

@TheMrFriendly
Copy link

hey all, I have done everything listed here to get my E3-1225 v2 mining on NiceHash (the app available since they've risen from their ashes), with no success.

set to run as Admin
virtual memory is set to 32000MB
Lock Pages is set for my username, & another called system, but my work PC is on a domain and it won't allow me to add 'Administrators'.
RAMMap did squat when I ran it.

thoughts?

@X-Chiup
Copy link

X-Chiup commented Dec 27, 2017

I did the same:

  • increase Virtual Memory (Pagefile) size
  • Enable the Lock Pages in Memory Option
  • use RAMMap, and click every submenu under Empty
  • Run as Administrator

No success.

@borzaka
Copy link

borzaka commented Dec 27, 2017

What's the problem? Still memory alloc failed: virtualalloc failed ?

@X-Chiup
Copy link

X-Chiup commented Dec 28, 2017

Actually I restarted the computer 2 times and directly the NicehashMiner Software after booting. Right now it's OK.

@cyxxx
Copy link

cyxxx commented Jan 3, 2018

did the same, no succes. had between 900 - 1000 h/s and now 150 h/s

  • VMem is 33000 MB
  • Spacedisk 58 GB
  • RamMap used to empty everything
  • as admin started
  • have no gpedit.msc

/edit it worked over group policys. If you dont have gpedit.msc load this, it worked for me:

https://www.itechtics.com/easily-enable-group-policy-editor-gpedit-msc-in-windows-10-home-edition/

what a relief, rly thought my cards was damaged.

@vahaldor
Copy link

It's a good idea to RESTART THE COMPUTER after all the steps mentioned here. My procedure was:

  • checked virtual memory, it was at 16GB, kept automatic setting
  • checked whether I have enough space on C:
  • enabled lock pages (after the manual download to Win10, read above)
  • RAMMAP (might not have any impact)
  • RESTART the computer

no admin rights needed during the start of the nicehash

@ziyush
Copy link

ziyush commented Jan 24, 2018

Here is your solution for this memory related issue, This error appear because of virtual memory set low in your PC, its not related to graphics card.
https://coinpricetoday.com/crypto/memory-object-allocation-failure-monero-ethereum-mining-issue-solved/

@cheyennefisher2009
Copy link

Hello just downloaded the miner..i says connected but its not mining any thing.. ive tried the above ideas but im pretty new to this so any advice for a newbie

@Pixels303
Copy link

Pixels303 commented Jan 31, 2018

what you guys are neglecting to include is this step: User Account Control.

You cannot run a executable as admin, unless you disable it. It is accessed via your control panel under User Accounts.

Mine works after making the modification AND doing the run as admin checkbox in the compatibility tab when selecting properties for the xmr-stak.exe AND Nicehashminderlegacy.exe
Make sure to restart the application to apply new setting.

I also did the lock pages mod as well, not sure if it relates, but might need it too

@Petaflopminingco
Copy link

@cheyennefisher2009 There are two CMD windows that will be open and running while NH mines. One of them has what youre mining on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests