Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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?

share|improve this question
1  
This question might be useful for you. –  Jivings Jan 7 '13 at 7:04
    
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? –  otakun85 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

4 Answers 4

up vote 5 down vote accepted

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.

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

To monitor the CPU 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.

share|improve this answer
1  
Note that this is not actually CPU usage, it's RAM usage. –  LaceCard Aug 15 '13 at 18:25

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

share|improve this answer
2  
What are the benefits over the regular top? –  Morgan Courbet Jan 7 '13 at 19:23
    
htop seems to be "better" htop.sourceforge.net/index.php?page=comparison –  Scoop Jan 8 '13 at 0:15
    
htop is more user friendly. I always use htop instead of top –  w0rldart Jan 23 '13 at 13:02

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

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" 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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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