Nexus 9000 Memory Issues

Nexus 9000v Memory issues

Last Updated: [last-modified] (UTC)

The Problem

Once upon a time I needed to lab out connectivity between Nexus 9000 switches and IOS-XE. So, I created a simple VIRL lab with a 9000v switch and a CSR1000v.

When I tried to configure BGP, I found that the peering would not come up on the N9K, and the neighbour was flapping on the CSR1000v.

In addition, the N9K would get the error below.

 

BGP Error
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd  
192.168.250.6   4 64512       0       0        0    0    0 00:43:01 Idle (NoMem)

 

The Cause

After some quick digging, I found that memory usage on the N9K was the problem, as shown here:

Memory Error
Switch-Lab# show system resources  
Load average:   1 minute: 0.20   5 minutes: 0.27   15 minutes: 0.31  
Processes   :   578 total, 1 running  
CPU states  :   2.04% user,   4.08% kernel,   93.87% idle  
        CPU0 states  :   0.00% user,   3.09% kernel,   96.90% idle  
        CPU1 states  :   3.12% user,   4.16% kernel,   92.70% idle  
Memory usage:   4041236K total,   3327872K used,   713364K free  
Current memory status: Severe Alert

As it turns out, the 9000v image in VIRL has only 4GB of memory and 1 CPU by default. This simply is not enough.

 

 


The Solution

What we really need is 8GB of memory and 2 CPU’s for each N9K in VIRL. This adds up quickly, so make sure you have enough resources on your host.

We start by creating a VM flavour. This is a profile that tells VIRL what resources to allocate to each node.

If you’d like to see the flavours that VIRL already has, log on to UWM, browse to Node Resources and then Flavors. You will see some results like this:

 
 
 

So now we need to create an additional flavour. Click Add, and enter a friendly name. Allocate resources as below, and then click Create.

  • RAM – 8192MB
  • CPU – 2
  • Disk – 0

 

Now that this has been created, we can allocate the flavour in VMMaestro. Start by opening or creating a topology, and add in your 9000v node.

Click the 9000v node in the topology window, and then click the node tab. Next to VM Flavor, click Browse. Now, select your custom flavour.

 

 

If you start the simulation and check the memory resources, you will see that the issue has been resolved.

Memory
Switch-Lab# show system resources
Load average:   1 minute: 0.56   5 minutes: 0.74   15 minutes: 0.63
Processes   :   600 total, 1 running
CPU states  :   1.59% user,   6.38% kernel,   92.02% idle
        CPU0 states  :   2.10% user,   5.26% kernel,   92.63% idle
        CPU1 states  :   0.00% user,   5.55% kernel,   94.44% idle
Memory usage:   8163772K total,   4304768K used,   3859004K free
Current memory status: OK

 

 


References

Cisco Learning Network – How to: Increase memory (RAM), or CPU allocation in a VIRL image

 

Leave a Reply