henry_blackie
Posts: 9
Joined: Fri Jun 29, 2012 8:01 pm

Memory split?

Mon Oct 14, 2013 6:53 pm

Could someone please explain to me what memory split is. When I'm going through tutorials they normally mention to change it but I'm never sure why. What difference does it make and is it better to have it high or low?

itimpi
Posts: 1082
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Memory split?

Mon Oct 14, 2013 7:03 pm

It is how much of your RAM is available for running program's and how much is used by the GPU (Graphics Processor Unit). The more RAM is allocated to the GPU the more intensive graphics processing can be done. There is no 'right' answer - it depends on what you want to with Pi. I would suggest that 64MB is a good value for most graphics purposes.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Memory split?

Mon Oct 14, 2013 7:34 pm

The GPU doesn't have it's own RAM so some of the system memory is allocated in the split.
The amount of RAM required depends on your needs 64MB to the GPU should suit most tasks however it may require more for decoding 1080p HD videos.

Richard S.

User avatar
jwzumwalt
Posts: 44
Joined: Sun Aug 04, 2013 4:00 pm

Re: Memory split?

Tue Oct 15, 2013 5:51 am

Memory split is a "suggestion" to the OS on how to use memory. How much should be dedicated to video and how much should be available to caching etc. When you split (allocate) memory, the OS will disregard the designated amounts of memory if it gets in trouble. But it uses your selection as a guideline - as long as everything goes well.

I use 256mb video and 256mb OS because I do a lot of graphics intensive programming (graphics instrumentation). I have seen the results of others benchmarks and they have found it very difficult to get the OS to use more than about 150mb. However, if the CPU would ever need more than 256mb, it will happily prioritize and start stealing from the video memory.

User avatar
RaTTuS
Posts: 10108
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Memory split?

Tue Oct 15, 2013 8:25 am

the GPU RAM cannot go below 16M - which is fine if you are just doing console work
or
32M if you have a Rotated display for console work
then if you are wanting to use the Camera it is suggest that you allocate 128M to the GPU
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mikerr
Posts: 2729
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Memory split?

Tue Oct 15, 2013 9:51 am

jwzumwalt wrote:Memory split is a "suggestion" to the OS on how to use memory. How much should be dedicated to video and how much should be available to caching etc. When you split (allocate) memory, the OS will disregard the designated amounts of memory if it gets in trouble. But it uses your selection as a guideline - as long as everything goes well.

I use 256mb video and 256mb OS because I do a lot of graphics intensive programming (graphics instrumentation). I have seen the results of others benchmarks and they have found it very difficult to get the OS to use more than about 150mb. However, if the CPU would ever need more than 256mb, it will happily prioritize and start stealing from the video memory.
That is NOT how memory split currently works on Pi - the memory split is a static setting at boot time, and can't be altered at runtime.

There is/was some work on dynamic memory split (CMA) to vary the GPU split at runtime - but its not in normal use (beta) as hasn't found to be reliable yet.

How much to set it at ?

If you have a 512MB Pi (modern model B), set it at 128MB and forget about it.
That's enough for every use of the GPU and leave "more than enough" to the CPU.

On a 256MB Pi (Model A / or older 256MB model B) - then you may find yourself changing it (smaller GPU RAM means more available for CPU and so often faster opeation in X, particulally web browsing).

16MB leaves 240MB for the OS, but then you can't view accelerated video e.g. youtube/ or mpeg video clips
64MB allows accelerated video
128MB is needed for heavy graphics use (XBMC) or the Pi Camera

As said, things are less cramped on a modern 512MB model B - 128Mb leaves 384MB for the OS, which is plenty.

gtj
Posts: 13
Joined: Tue Jan 19, 2016 10:32 pm

Re: Memory split?

Tue Jan 19, 2016 10:43 pm

Hello,

I got a B+ model running motion with a USB camera. I'm also planning to replace that with a 1080p USB camera in the near future for full HD results. My question is, what would the ideal balance be between CPU and GPU memory? Should I leave the GPU memory at 128? Should I lower or should I increase this number?

The Pi is going to run motion 24/7 with no other processing, peripherals or hdmi cable attached to it.

User avatar
RaTTuS
Posts: 10108
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Memory split?

Wed Jan 20, 2016 8:50 am

gtj wrote:Hello,

I got a B+ model running motion with a USB camera. I'm also planning to replace that with a 1080p USB camera in the near future for full HD results. My question is, what would the ideal balance be between CPU and GPU memory? Should I leave the GPU memory at 128? Should I lower or should I increase this number?

The Pi is going to run motion 24/7 with no other processing, peripherals or hdmi cable attached to it.
if it is usb [1080p usb umm ] then you are not using any GPU memory
if you are not using x
then probably down to 16M

however - the raspberry PI camera will possibly be a better option - and that needs GPU memory
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

gtj
Posts: 13
Joined: Tue Jan 19, 2016 10:32 pm

Re: Memory split?

Wed Jan 20, 2016 1:07 pm

Thank you very much for the answer.

I thought so. I just wondered if any GPU memory needed for the decoding as 1080p is a quite demanding resolution.

Cheers.

Return to “Beginners”