Options

how is Cisco router memory partitioned

m4rtinm4rtin Member Posts: 170
In case I execute:
show version | i mem


..then I can see that I have "229376K/32768K bytes of memory". In other words I have 234881024 bytes of RAM for software. Now if I do:
show processes memory


..I see following information: "Total: 187665408, Used: 59200080, Free: 128465328". Why isn't the "Total" amount of memory in "show processes memory" output 234881024? icon_rolleyes.gif

Comments

  • Options
    vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    I think you will find that it varies by platform, CEF is going to be one of the things that will use memory, but you may not see it listed as a process. CEF has several database tables that get loaded into memory to be able to hardware switch Layer 3 traffic, handle ACLs at wire speed, etc.
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • Options
    m4rtinm4rtin Member Posts: 170
    vinbuck wrote: »
    I think you will find that it varies by platform, CEF is going to be one of the things that will use memory, but you may not see it listed as a process. CEF has several database tables that get loaded into memory to be able to hardware switch Layer 3 traffic, handle ACLs at wire speed, etc.

    For example in one Cisco 1841 I have 128MB memory in total:
    C1841#sh version | i mem
    Cisco 1841 (revision 6.0) with 115712K/15360K bytes of memory.
    C1841#
    

    According to "show processes memory" the memory usage in total is following:
    Processor Pool Total:   69970528 Used:   14621188 Free:   55349340
          I/O Pool Total:   15728640 Used:    4131440 Free:   11597200
    

    While "I/O Pool Total" is same as the amount of I/O memory displayed in "show version" output, then same does not apply to "Processor Pool Total"- 68330KB vs 115712KB. Where is this 46MB used? In addition, at least on Cisco 1841, Cisco 2620 and Cisco 3640 the CEF is part of the processes:
    C1841#show processes mem | i CEF
      79   0      73328          0      73328          0          0 CEF process     
     172   0        164          0       7136          0          0 CEF Scanner     
    C1841#
    

    Is it possible that IOS kernel takes 46MB of RAM? Or is some portion of RAM used to emulate some file systems? icon_rolleyes.gif
  • Options
    Forsaken_GAForsaken_GA Member Posts: 4,024
    en
    m4rtin wrote: »
    Is it possible that IOS kernel takes 46MB of RAM? Or is some portion of RAM used to emulate some file systems? icon_rolleyes.gif

    Yes. IOS is a monolithic image, the entire thing is loaded into memory and stays resident. The amount of memory consumed may not be equal to the amount of flash it takes up, as the images tend to come in a compressed format. You can uncompress the image and store that in flash, and it will speed up load times, if you have enough flash to do so, otherwise, that's why you see it say uncompressing when it's loading, it's uncompressing the image from flash into memory, and then the bootloader hands off to the IOS kernel after it's fully in memory.
Sign In or Register to comment.