I am trying to figure out a good split for the CPU/GPU. Is there a way to monitor the CPU and GPU usage to see where I should make the split?

  • 1
    This question might be useful for you. – Jivings Jan 7 '13 at 7:04
  • 1
    IMO the question is confusing. Do you want to know the memory usage for application and graphic (so you can define the split) or do you want to know the current CPU/GPU load? – keiki Jan 7 '13 at 15:05
  • @otakun85 I want to know the current usage of the applications so that I can make a good decision about where to make the split – Scoop Jan 7 '13 at 21:33
  • @Jivings Yeah that was a good question. Is good to know that certain features come on and turn off depending on how much memory is allocated to GPU. If possible though it would be helpful to know the exact usage too determine which category I fall into – Scoop Jan 8 '13 at 0:25

One easy solution is to get the Raspberry Pi itself to manage how the RAM is split between the CPU and GPU with dynamic memory split. While raspi-config cannot do this for you, there are example settings for /boot/config.txt available on the forums.

  • Thanks for this. I was not aware that the team had got the dynamic split right. – Vincent P Jan 8 '13 at 5:34

You can get a real-time view of memory usage using either the top or htop command. You may need to install htop if you get the message htop: command not found. Assuming you are using Raspbian, install it by running sudo apt-get install htop

  • 2
    What are the benefits over the regular top? – Morgan Courbet Jan 7 '13 at 19:23
  • 1
    htop seems to be "better" htop.sourceforge.net/index.php?page=comparison – Scoop Jan 8 '13 at 0:15
  • 2
    htop is more user friendly. I always use htop instead of top – w0rldart Jan 23 '13 at 13:02
  • Plus, if you are using a multi-core machine such as RPi 2 you see the load for each core in a nice bar graph, and for example when you see 'python' in the list of tasks it shows the entire comamnd line so you see which program is running – jpwynn Jan 23 '16 at 22:39
  • @jpwynn Note that with top you press 1 and you see all processors too. But I agree that htop is generally better/easier to use. – Alexis Wilke Mar 14 '18 at 2:11

Basically you cannot currently get the GPU usage. You can only get the CPU usage, try the top command.

Update Raspbian now includes htop which is more verbose and easier to read

Regarding the optimum CPU/GPU split. It really depends on what you are using your RPi for. If your not playing videos and games (GPU optimized), then give the CPU the most amount of RAM. Also if your running "headless" (Not connected to a screen) then assign the CPU as much RAM as you can.

Chromium does not currently use the GPU, check the following thread. It's from one of the guys doing the development of Chromium for the Raspberry Pi. Also there are some tips on how to get Chromium to run faster in the original post.

  • so the issue is that I am not sure if chrome uses the gpu or not. And if it does, for what types of things. It would be useful to GPU usage, but might not be possible – Scoop Jan 8 '13 at 0:23
  • @Scoop I've updated my answer accordingly. – Vincent P Jan 8 '13 at 5:33
  • @Scoop From my test today (2018) support for the GPU is included in the Chrome browser. You can see it by going to chrome://gpu. – Alexis Wilke Mar 14 '18 at 4:14

To monitor the RAM usage, you can run free -h -s 1. Every second (-s 1), a similar table will be displayed:

             total       used       free     shared    buffers     cached
Mem:          438M       146M       292M         0B        15M       102M
-/+ buffers/cache:        28M       409M
Swap:          99M         0B        99M

The line Mem: is what you are looking for.

In the example above, you can see that, on a total of 438MB, 146MB are currently used, and 292MB remain free. On my 512MB RPi, I have set 64MB for the GPU.

  • 2
    Note that this is not actually CPU usage, it's RAM usage. – Hut8 Aug 15 '13 at 18:25

To monitor the CPU, RAM and SWAP usage in Raspbian, you can use TOP or HTOP.

In terminal, run top. TOP is available by default, and gives reasonably good details. TOP in Raspbian Terminal RPi3

But, I find HTOP to be more useful, with better details and features available. HTOP is not available by default, and need to be installed.

Run sudo apt-get update && sudo apt-get install htop in Terminal to install HTOP.

In terminal, run htop after the install is completed.

HTOP in Raspbian RPi 3

Hope that helps.


The command that will give you insight into what's being allocated by the GPU is sudo vcdbg reloc. The output looks like what begins here. In my case, I could see that the 236M allocated was too close to the value in /boot/config.txt -> gpu_mem=256 so I needed to bump that up a little.

Relocatable heap version 4 found at 0x30000000
total space allocated is 236M, with 234M relocatable, 2.3M legacy and 0 offline
1 legacy blocks of size 2359296

free list at 0x3ad9aaa0
352 free memory in 2 free block(s)
largest free block is 320 bytes

0x30000000: legacy block 2.3M
0x30240000: free 320
[  80] 0x30240140: used  608 (refcount 1 lock count 0, size      540, align    4, data 0x30240160, d0rual) 'GLXX_TEXTURE_T'
[  78] 0x302403a0: used  192 (refcount 1 lock count 0, size      128, align    4, data 0x302403c0, D1rual) 'GLXX_BUFFER_INNER_T.storage'
  • 1
    It may be a bit confusing to people that you've said, "In my case, I could see that the 236M allocated was too close to the value in /boot/config.txt -> gpu_mem=256", since at first glance this implies you got the first number from the first line, which will always be the same. The amount of free memory is actually in the second stanza, and the amount of used would be the allocated value (236M) minus this. Those will accord with vcgencmd get_mem reloc and vcgencmd get_mem reloc_total. raspberrypi.org/forums/viewtopic.php?t=158157 – goldilocks Jul 19 '19 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.