LXC 컨테이너에서 openstack을 실행 중인데 LXC 컨테이너 네트워크가 매우 느리지만 호스트에서는 매우 빠른 것을 발견했습니다.
주인
[root@ostack-infra-01 ~]# time wget http://mirror.cc.columbia.edu/pub/linux/centos/7.5.1804/updates/x86_64/repodata/0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2
--2018-08-04 00:24:09-- http://mirror.cc.columbia.edu/pub/linux/centos/7.5.1804/updates/x86_64/repodata/0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2
Resolving mirror.cc.columbia.edu (mirror.cc.columbia.edu)... 128.59.59.71
Connecting to mirror.cc.columbia.edu (mirror.cc.columbia.edu)|128.59.59.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4515677 (4.3M) [application/x-bzip2]
Saving to: ‘0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2’
100%[===========================================================================================================================================>] 4,515,677 23.1MB/s in 0.2s
2018-08-04 00:24:09 (23.1 MB/s) - ‘0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2’ saved [4515677/4515677]
real 0m0.209s
user 0m0.008s
sys 0m0.014s
동일한 호스트의 LXC 컨테이너
[root@ostack-infra-01 ~]# lxc-attach -n ostack-infra-01_neutron_server_container-fbf14420
[root@ostack-infra-01-neutron-server-container-fbf14420 ~]# time wget http://mirror.cc.columbia.edu/pub/linux/centos/7.5.1804/updates/x86_64/repodata/0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2
--2018-08-04 00:24:32-- http://mirror.cc.columbia.edu/pub/linux/centos/7.5.1804/updates/x86_64/repodata/0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2
Resolving mirror.cc.columbia.edu (mirror.cc.columbia.edu)... 128.59.59.71
Connecting to mirror.cc.columbia.edu (mirror.cc.columbia.edu)|128.59.59.71|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4515677 (4.3M) [application/x-bzip2]
Saving to: ‘0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2’
100%[===========================================================================================================================================>] 4,515,677 43.4KB/s in 1m 58s
2018-08-04 00:26:31 (37.3 KB/s) - ‘0d7e660988dcc434ec5dec72067655f9b0ef44e6164d3fb85bda2bd1b09534db-primary.sqlite.bz2’ saved [4515677/4515677]
real 1m59.121s
user 0m0.002s
sys 0m0.361s
네트워크에 대한 제한을 설정하는 멋진 구성이 없습니다. 잘 작동하고 최고 속도를 제공하는 다른 호스트가 있습니다. 여기서 무엇이 잘못되었다고 생각하시나요?
kernel version Linux ostack-infra-01 3.10.0-862.3.3.el7.x86_64 #1 SMP
센트OS 7.5
답변1
해결책
호스트에는 다음과 같은 설정이 있으며 이로 인해 내 dmesg에 수많은 커널 오류 스택이 넘치게 됩니다. (7 - 디버그 수준).
[root@lxc ~]# cat /proc/sys/kernel/printk
7 4 1 3
나는 그것을 다음과 같이 변경했습니다 :
[root@lxc ~]# cat /proc/sys/kernel/printk
3 4 1 3
iptables --checksum-fill
나중에 내 규칙이 iptables
많은 체크섬 오류를 생성하여 커널 스택 오류가 발생한다는 것을 발견했습니다 dmesg
.