Basics GPUs Practice Reviews

Trick 17: Accurately reduce free graphics card memory – without system load and driver problems | Tutorial

I admit it, in a time where everyone is screaming for more and more dedicated memory on the graphics card, the concern of this tutorial today is rather incomprehensible for many. However, certainly only at first glance. Because all of this solves a problem very elegantly, which one might face (admittedly) very rarely, but nevertheless sometimes and for which there is no practical solution right away, even in the area of the almost endless Google search. And since this afternoon still another hot dino waits for us, I fetched the article for this morning again from the depths of the archive. Waiting for Dino Lake with a slightly different morning reading….

Original article

It doesn’t matter if an older application strikes because the allocable or free memory exceeds the upper limit of what the program can handle (remember the limits of the 32-bit programs) or because you just want to test when the free memory might not be enough and what error images are triggered – I was now facing this problem myself and needed a workable solution that does not generate system or graphics card load and still blocks memory cleanly.

For me, the solution approach at the end was certainly simple, because I just wrote a small OpenCL program that does just that: allocate memory, so to speak block it and protect it for access by other programs. DirectX and memory management are also not simplistic when it comes to moving and offloading content contained in graphics card memory when the program in question is stumbling in the background. However, all this is (for reasons of liability) only part of my own tool collection and nothing for the download area. But the solution approach is simple in itself and so my thanks also go to my colleague Yannick Guerrini, who recommended to me as a replacement a common tool that can be used skilfully for these purposes.

Blocking and paralyzing – We only need two free tools

We can also skilfully do the allocation with memtestCL (download). This slightly older freeware tool from Stanford University is also available as source code on Github and it does exactly what we want.  However, there is a limitation here that the default of the memory to be tested must be less than 4 GB. Here you can help yourself by simply starting two instances (or more) and sairating up a lot more memory. The command line parameters are simple and if you want, simply write a batch file (or several with different size specifications). If you have more than one graphics adapter in your computer (e.g. CPU with iGP), selects the desired graphics card.

The call is simple and the optional batch file is. For example, if you 2 GB, then you simply start it as memtestCL 2048 – it almost doesn’t get any easier. By default, 50 iterations are set, leaving enough time to stop the program with the second tool. For this we need the Process Explorer (download) of Sysinternals. You can just start it like that. How the individual steps now work, I will show you in a way.

Practical example: we block 4 GB with memtestCL

First, the initial situation: Except for a little window-gash, the graphics memory is almost empty.

But that is easy to change! Now let’s start memtestCL with the desired memory size and then the Process Explorer. There we have alphabetically descending the current processes listed (e.g. “Process” in the table header) and locate the entry to memtestCL.exe.

We select this line and then right click on the entry. A pop-up menu appears, where we select the function “suspend”.

Now the program is in fact in sleep mode and does not cause any processor load. However, the memory is securely blocked and is no longer available to the video card. Clever people can also test this with the afterburner overlay, where suddenly the memory allocation has increased by the previously selected amount.

But you can also easily view and check it from the Windows Task Manager resource display. The result is the same.

If you want to allocate and / or allocate memory from 4 GB, you will start a second instance with the additional memory size you want.

And again please do not forget the suspend mode (see above)!

The result is unique and can be checked directly in Task Manager. In this case, I had simply blocked 2 GB twice.

You will read about what I needed it for now. when it comes to graphics card testing for a certain new product. Let yourself be surprised!

 

Kommentar

Lade neue Kommentare

B
Besterino

Urgestein

6,719 Kommentare 3,320 Likes

But y tho? ;)

Theoretisch interessant, aber mir fehlt gerade jede Idee, wo ich das brauchen könnte. Bin kein Softwareentwickler.

Antwort 2 Likes

r
roecket

Mitglied

24 Kommentare 11 Likes

Wenn das mal nicht für die 5500XT 8GB und die (simulierte) 4GB Variante ist...

Antwort 4 Likes

M
McFly_76

Veteran

396 Kommentare 136 Likes

Eine Auffälligkeit kann man auch gut beobachten wenn im PC der Arbeitsspeicher von 16 auf 32 GB bzw. auf 64 GB aufgerüstet wird.
Dann erhöht sich in Spielen / Benchmarks die Grafikspeicherbelegung um bis zu ~ 0,5 GB ^^

Antwort Gefällt mir

Igor Wallossek

1

10,185 Kommentare 18,780 Likes

Das liegt daran, dass sich die Speicherseiten gegenseitig einblenden. Nimm das Shared Memory weg und der Effekt ist Geschichte :)

Nein sowas aber auch...

Antwort 1 Like

m
maxitaxi96

Mitglied

64 Kommentare 10 Likes

Cool! Endlich ein Weg wie ich die 8 unnötigen Gigabyte von meiner Karte blockiert bekomme! Dann kann ich mir den Kauf einer Titan RTX selber rechtfertigen :)

/s

Antwort 2 Likes

Smartengine

Veteran

146 Kommentare 134 Likes

Ich starte einfach Cities skylines und hab meine 16GB voll :D

Antwort Gefällt mir

S
Staarfury

Veteran

257 Kommentare 206 Likes

Igor hat endlich mal was gefunden, was mit OpenCL anstandslos funktioniert :ROFLMAO:

Antwort 1 Like

big-maec

Urgestein

827 Kommentare 475 Likes

Das hat er ja auch selbst geschrieben.;)

Antwort 1 Like

F
Furda

Urgestein

663 Kommentare 370 Likes

MemtestCL kann man selbst sehr einfach ändern, um mehr als 4GB zu unterstützen, wer das selbst kompilieren kann...

Antwort Gefällt mir

G
Guest

keeping 4GB occupied smells a lot like simulating a 40x0 12GB from the 16GB variant since the 12GB variant will not be sampled :D

Antwort 2 Likes

Sephiroth Nikon

Mitglied

55 Kommentare 7 Likes
d
derGhostrider

Mitglied

64 Kommentare 53 Likes

Hmmmm… Seit Jahrzehnten habe ich mehr RAM in meinen Rechnern als üblich. Jetzt z.B. 64GB - seit einigen Jahren.
Aber Abstürze, weil man „zuviel“ RAM hat?
Das erscheint mir schon reichlich weit hergeholt.
Also bei HX oder TX Chipsätzen (späte 90er…) gab‘s unter Umständen Geschwindigkeitseinbrüche, wenn man außerhalb der cachable Area landete…. Darum kaufte man Boards mit „dem richtigen“ Chipsatz.
Aber Abstürze???
Ich weiß nicht…

Antwort Gefällt mir

k
k0k0k0

Veteran

136 Kommentare 63 Likes

Eher 70GB RAM/Swap^^

Antwort 1 Like

Danke für die Spende



Du fandest, der Beitrag war interessant und möchtest uns unterstützen? Klasse!

Hier erfährst Du, wie: Hier spenden.

Hier kannst Du per PayPal spenden.

About the author

Igor Wallossek

Editor-in-chief and name-giver of igor'sLAB as the content successor of Tom's Hardware Germany, whose license was returned in June 2019 in order to better meet the qualitative demands of web content and challenges of new media such as YouTube with its own channel.

Computer nerd since 1983, audio freak since 1979 and pretty much open to anything with a plug or battery for over 50 years.

Follow Igor:
YouTube Facebook Instagram Twitter

Werbung

Werbung