3

I'm new to mininet,I try two ways to install the lastest mininet:

  • sudo apt-get install mininet
  • install mininet by source code

I get this message: Error setting resource limits. Mininet's performance may be affected when I using sudo mn command to start the mininet CLI.

what is the message mean,I'm not limit any resource or my machine is not good enough?I see the issue like this,but I'm not docker.

richard
  • 49
  • 6

2 Answers2

1

I know your aren't using docker but for anyone who use Docker and end up being here:

As you can see in @rechard answer, this warning appears when mininet can't set some network parameters to increase arp table. To fix this issue in docker you could share host network parameters with docker container.

You can find complete Dockerfile and docker-compose file here.

Esterlinkof
  • 1,444
  • 3
  • 22
  • 27
0

I get the anwser,because my ubuntu version is 3.0.13-100,a bug in this version.if you want to solve this problem,you need to update your kernl version

the bug is when you run the command like this:

$ sudo sysctl -w net.ipv4.neigh.default.gc_thresh1=128

get this error message:

error: "Invalid argument" setting key "net.ipv4.neigh.default.gc_thresh1"

this bug in version 3.0.13-96 to 3.0.13-100,the detail view this link

when mininet start,It will run the fixLimits() function:

def fixLimits(): "Fix ridiculously small resource limits." debug( "*** Setting resource limits\n" ) try: rlimitTestAndSet( RLIMIT_NPROC, 8192 ) rlimitTestAndSet( RLIMIT_NOFILE, 16384 ) #Increase open file limit sysctlTestAndSet( 'fs.file-max', 10000 ) #Increase network buffer space sysctlTestAndSet( 'net.core.wmem_max', 16777216 ) sysctlTestAndSet( 'net.core.rmem_max', 16777216 ) sysctlTestAndSet( 'net.ipv4.tcp_rmem', '10240 87380 16777216' ) sysctlTestAndSet( 'net.ipv4.tcp_wmem', '10240 87380 16777216' ) sysctlTestAndSet( 'net.core.netdev_max_backlog', 5000 ) #Increase arp cache size sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh1', 4096 ) sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh2', 8192 ) sysctlTestAndSet( 'net.ipv4.neigh.default.gc_thresh3', 16384 ) #Increase routing table size sysctlTestAndSet( 'net.ipv4.route.max_size', 32768 ) #Increase number of PTYs for nodes sysctlTestAndSet( 'kernel.pty.max', 20000 ) # pylint: disable=broad-except except Exception: warn( "*** Error setting resource limits. " "Mininet's performance may be affected.\n" ) # pylint: enable=broad-except

richard
  • 49
  • 6