【OpenStack】CentOS7でファイルサーバ立てたけどやたらとスループットが悪い

使っていたNASの容量がもうパンパンだったので,大量にDisk詰んだRDOにCentOS7をたててファイルサーバとしてNAS代わりにした。

が,やったらと速度が出ない。
ファイル移行で8Mbps程度しか出ていない。

で,「Neutron 速度がでない」とかでぐぐってみると,大体同じ事象がたくさん出てくる。

NICにトラフィック処理をオフロードしていることが原因のようで。

ここらを参考にGROをOFFにした。

・ Slow network speed between VM and external
・ NICのオフロード機能を無効にする

    $ ethtool -k enp4s0
    Features for enp4s0:
    rx-checksumming: on
    tx-checksumming: off
            tx-checksum-ipv4: off
            tx-checksum-ip-generic: off [fixed]
            tx-checksum-ipv6: off
            tx-checksum-fcoe-crc: off [fixed]
            tx-checksum-sctp: off [fixed]
    scatter-gather: off
            tx-scatter-gather: off
            tx-scatter-gather-fraglist: off [fixed]
    tcp-segmentation-offload: off
            tx-tcp-segmentation: off
            tx-tcp-ecn-segmentation: off [fixed]
            tx-tcp6-segmentation: off
    udp-fragmentation-offload: off [fixed]
    generic-segmentation-offload: off [requested on]
    generic-receive-offload: on
    large-receive-offload: off [fixed]
    rx-vlan-offload: on
    tx-vlan-offload: on
    ntuple-filters: off [fixed]
    receive-hashing: off [fixed]
    highdma: off [fixed]
    rx-vlan-filter: off [fixed]
    vlan-challenged: off [fixed]
    tx-lockless: off [fixed]
    netns-local: off [fixed]
    tx-gso-robust: off [fixed]
    tx-fcoe-segmentation: off [fixed]
    tx-gre-segmentation: off [fixed]
    tx-ipip-segmentation: off [fixed]
    tx-sit-segmentation: off [fixed]
    tx-udp_tnl-segmentation: off [fixed]
    fcoe-mtu: off [fixed]
    tx-nocache-copy: off
    loopback: off [fixed]
    rx-fcs: off
    rx-all: off
    tx-vlan-stag-hw-insert: off [fixed]
    rx-vlan-stag-hw-parse: off [fixed]
    rx-vlan-stag-filter: off [fixed]
    l2-fwd-offload: off [fixed]
    busy-poll: off [fixed]

    $ sudo ethtool -K enp4s0 gro off
    $ ethtool -k enp4s0
    Features for enp4s0:
    rx-checksumming: on
    tx-checksumming: off
            tx-checksum-ipv4: off
            tx-checksum-ip-generic: off [fixed]
            tx-checksum-ipv6: off
            tx-checksum-fcoe-crc: off [fixed]
            tx-checksum-sctp: off [fixed]
    scatter-gather: off
            tx-scatter-gather: off
            tx-scatter-gather-fraglist: off [fixed]
    tcp-segmentation-offload: off
            tx-tcp-segmentation: off
            tx-tcp-ecn-segmentation: off [fixed]
            tx-tcp6-segmentation: off
    udp-fragmentation-offload: off [fixed]
    generic-segmentation-offload: off [requested on]

    generic-receive-offload: off   # OFFになった

    これで転送やりなおしたら200Mbpsくらいまで改善された。100Mbpsでした。
    しかし,これって再起動したらまた戻るんだっけか?

    rcスクリプトとかにethtoolを仕込んでおかないとダメっぽい。

    Turning off GRO on startup
    ・ How to persist ethtool settings through reboot

    # /etc/sysconfig/network-scripts/ifcfg-enp4s0
    ETHTOOL_OPTS=”gro off”

    これでどうかしら。