2017-03-21 31 views
0

我是新來mininet,我嘗試安裝最新的mininet兩種方式:Mininet的CLI獲取錯誤:設置資源限制時出錯。 Mininet的業績可能會受到影響

  • 命令和apt-get安裝mininet
  • 通過源代碼安裝mininet

當我使用sudo mn命令啓動mininet CLI時,我收到此消息:Error setting resource limits. Mininet's performance may be affected

什麼是消息的意思,我不限制任何資源或我的機器不夠好?我看到issue這樣,但我不是碼頭工人。

回答

0

我得到的anwser,因爲我的Ubuntu版本是3.0.13-100,在這個錯誤version.if要解決這個問題,你需要更新你的kernl版本

的錯誤是,當你像這樣運行命令:

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

收到此錯誤信息:

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

這個bug在3.0.13-96版本3.0.13-100,詳細查看該link

時mininet啓動,它將運行fixLimits()函數:

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