Some cards need export GPU_MAX_ALLOC_PERCENT=95

gustav_simonssongustav_simonsson Member, Moderator Posts: 21 mod
If you have trouble mining on (older) cards that have enough memory, you may need:

Some cards have enough memory for Ethereum mining, but have a default max alloc buf size smaller than what's needed. You can check this value with 'geth gpuinfo' or 'ethminer -G --opencl-device 0'


  • TechnologovTechnologov Member Posts: 102 ✭✭
    I had to do this on my Radeon R9 290.
  • HeisenTradeHeisenTrade Member Posts: 51
    why 95 and not just 100??
  • sphinxsphinx Member Posts: 18
    What happens when DAG goes over 2GB?
  • ILSDaveILSDave Member Posts: 3
    Dont know how to do this. I have a 290x card, and the DAG wont load because of this limit. How do I change the limit?
  • sphinxsphinx Member Posts: 18
    Dag is 2GB min now...Dag is a bit of a a DAAG
  • gustav_simonssongustav_simonsson Member, Moderator Posts: 21 mod
  • KBKKBK Member Posts: 1
    Thanks much, fixed my issue. Miner was mining, did a power cycle last night, miner wasn't mining, pull hair.
  • BishopBishop Ontario, CanadaMember Posts: 2
    I needed to do this on a 7950 - 3GB card.
  • ConradJohnsonConradJohnson Member Posts: 130 ✭✭
    edited August 2015
    so how is this command entered?

    ./geth export GPU.... ?

    EDIT: Ah... Environment Variables... got it.

  • sly5amsly5am Member Posts: 7
    for windows is this "setx GPU_MAX_ALLOC_PERCENT=95" ?
  • julesjules Member Posts: 1 ✭✭
    hello :) newbie here.

    Im trying out gpu miner, but I suspect that my card is simply too old for this, can any one make sense of this?

    So in short I'm running these commands:
    $ export GPU_MAX_ALLOC_PERCENT=100
    $ geth gpuinfo
    $ geth gpubench 0

    Then I see "WARNING: DAG size (1073739904) larger than device max memory allocation size (268435456)." ... What I understand from this is that "Global mem size" of 1 GB doesn't help when "device max memory allocation size" is only 256 MB :(

    It looks like this:

    [email protected] ~/programs/go-ethereum (gpu_miner)$ export GPU_MAX_ALLOC_PERCENT=100
    [email protected] ~/programs/go-ethereum (gpu_miner)$ echo $GPU_MAX_ALLOC_PERCENT
    [email protected] ~/programs/go-ethereum (gpu_miner)$ ./build/bin/geth gpuinfo
    ============ OpenCL Device Info =============
    Platform id 0
    Platform Name Apple
    Platform Vendor Apple
    Platform Version OpenCL 1.2 (May 10 2015 19:38:45)
    Platform Extensions cl_APPLE_SetMemObjectDestructor cl_APPLE_ContextLoggingFunctions cl_APPLE_clut cl_APPLE_query_kernel_names cl_APPLE_gl_sharing cl_khr_gl_event
    Platform Profile FULL_PROFILE

    Device OpenCL id 0
    Device id for mining 0
    Device Name ATI Radeon HD 6750M
    Vendor AMD
    Version OpenCL 1.2
    Driver version 1.2 (Jun 10 2015 16:27:05)
    Address bits 32
    Max clock freq 600
    Global mem size 1073741824
    Max constant buffer size 65536
    Max mem alloc size 268435456
    Max compute units 6
    Max work group size 256
    Max work item sizes [256 256 256]
    Found 1 devices. Benchmark first GPU: geth gpubench 0
    Mine using all GPUs: geth --minegpu 0
    [email protected] ~/programs/go-ethereum (gpu_miner)$ ./build/bin/geth gpubench 0
    I0809 00:57:51.022684 34821 ethash.go:202] Generating DAG for epoch 0 (size 1073739904) (0000000000000000000000000000000000000000000000000000000000000000)
    I0809 00:57:51.959769 34821 ethash.go:219] Done generating DAG for epoch 0, it took 937.094986ms
    WARNING: DAG size (1073739904) larger than device max memory allocation size (268435456).
    You probably have to export GPU_MAX_ALLOC_PERCENT=95
    Initialising device 0: ATI Radeon HD 6750M
    Starting benchmark (60 seconds)
    Error in Search clEnqueueNDRangeKernel : cl: Mem Object Allocation Failure
    hashes/s : 0
  • Silver3dragoSilver3drago Member Posts: 2

    ^-- This may solve the problems outlined in this thread for some older cards. You still need enough GDDR to hold the DAG file, but it gets around the allocation size limitations.
  • crsminercrsminer Member Posts: 75

    why 95 and not just 100??

  • gregbkgregbk Member Posts: 3
    Hello, I got the same DAG error on windows8.1. After lot of investigation and reboot, I think the problem come as you said from graphic card driver & soft (for me catalyst amd HD 6900 series).

    I can mine with default driver, but very low perf (I think) =5MH

    ethminer --list-devices
    CL_DEVICE_GLOBAL_MEM_SIZE: 2 147 483 648
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1 877 999 616 --> 1.9GB (DAG ok)
    With catalyst drivers, seems like whatever option I setx (+ some reboot), it is stuck on 500MB, so I can't create DAG. I understand somehow catalyst soft hardfixe that value.

    ethminer --list-devices
    CL_DEVICE_GLOBAL_MEM_SIZE: 2 147 483 648
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 536 870 912 -->500MB (DAG FAILS)
    I tried to install latest amd drivers only without catalyst soft, but couldn't get the card detected, or just got the value hard stuck.

    I will be glad to get any suggestion....

    Thank you!
  • PontiacGTXPontiacGTX Member Posts: 28
    does this appear frequently or just it is a prroblem with the bat?
Sign In or Register to comment.