[c-nsp] Fragmented memory

Justin M. Streiner streiner at cluebyfour.org
Fri Apr 13 20:48:59 EDT 2007


On Fri, 13 Apr 2007, Leonardo Gama Souza wrote:

> Hi there.
> Does the memory fragmentation usually take place when the free memory is
> under 50MB?
> I have a clue of this fragmentation when there is a lot of difference
> between free and largest memory. Isn't it?

It can take place in most instances, but the effect will probably be more 
pronounced when the amont of free memory in the router is low.  There 
really isn't a hard-and-fast limit to when fragmentation will occur.  If 
the IOS version you're running doesn't have any memory leaks and you have 
plenty of free memory, fragmentation should not be a big problem.

If the router needs X MB for a given process/task and X MB is available, 
but not in one contiguous chunk, IOS will allocate the memory, but it will 
be fragmented to fill the appropriate 'holes'.

If your router is running low enough on free/contiguous memory to the 
point where fragmentation is causing you performance problems, you would 
need to:
1) look for unnecessary services/processes running on your router and turn 
them off.  You might need to reboot after saving the config to get any
benefit from this.
2) look for memory leaks.  Fixing this usually requires an IOS upgrade
3) optimize your routing architecture.  Does the router need to carry a 
full BGP routing table?  Is it in your OSPF backbone area when it really 
doesn't need to be?
4) last but not least you may simply need more RAM in the router to do 
what you want to do

jms


More information about the cisco-nsp mailing list