kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.42k stars 4.88k forks source link

High HTTP latency when serving files from 9pfs #1370

Open pier-oliviert opened 7 years ago

pier-oliviert commented 7 years ago

BUG REPORT

I have a website that I'm trying to run through minikube and while everything works, loading a single page on my host browser take upwards of 2 minutes. Connections between Pods seem to be normal.

The problem might originate from VirtualBox, but I'm not sure. Here's the minikube config:

Name:            minikube
Groups:          /
Guest OS:        Linux 2.6 / 3.x / 4.x (64-bit)
UUID:            834ea363-7d8c-4b5a-8139-6f74650b0f6b
Config file:     /Users/pothibo/.minikube/machines/minikube/minikube/minikube.vbox
Snapshot folder: /Users/pothibo/.minikube/machines/minikube/minikube/Snapshots
Log folder:      /Users/pothibo/.minikube/machines/minikube/minikube/Logs
Hardware UUID:   834ea363-7d8c-4b5a-8139-6f74650b0f6b
Memory size:     2048MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            on
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  2
PAE:             on
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  disabled
Boot Device (1): DVD
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State:           running (since 2017-04-14T11:28:54.001000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            SATA
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
SATA (0, 0): /Users/pothibo/.minikube/machines/minikube/boot2docker.iso (UUID: 87e7fc8f-6505-40fb-8787-4389906139a6)
SATA (1, 0): /Users/pothibo/.minikube/machines/minikube/disk.vmdk (UUID: 963fad28-7406-453c-855c-a434509c15f2)
NIC 1:           MAC: 0800270E1730, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0):   name = ssh, protocol = tcp, host ip = 127.0.0.1, host port = 50010, guest ip = , guest port = 22
NIC 2:           MAC: 0800272BEC67, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: CoreAudio, Controller: AC97, Codec: STAC9700)
Clipboard Mode:  disabled
Drag and drop Mode: disabled
Session name:    headless
Video mode:      720x400x0 at 0,0 enabled
VRDE:            disabled
USB:             disabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  

Name: 'Users', Host path: '/Users' (machine mapping), writable

VRDE Connection:    not active
Clients so far:     0

Video capturing:    not active
Capture screens:    0
Capture file:       /Users/pothibo/.minikube/machines/minikube/minikube/minikube.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
OS type:                             Linux26_64
Additions run level:                 2
Additions version:                   5.1.6 r110634

Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2017/04/13 22:43:01 UTC)
Facility "VirtualBox System Service": active/running (last update: 2017/04/13 22:43:02 UTC)
Facility "Seamless Mode": not active (last update: 2017/04/13 22:43:01 UTC)
Facility "Graphics Mode": not active (last update: 2017/04/13 22:43:01 UTC)

I did change the NIC to use the paravirtualized network but speed stayed the same.

I also tried #1353 but it didn't fix it for me. Here's a poorly representative screenshot of what's going on when I load the page and look at the network tab in Chrome:

screen shot 2017-04-12 at 09 05 46

minikube version: v0.18.0

Environment:

What you expected to happen: Get the page load under 600ms would be acceptable.

How to reproduce it (as minimally and precisely as possible):

Start minikube with VirtualBox and run a rails server and try to access it from the host. That page needs to have external asset to increase the number of connection going through minikube.

Anything else do we need to know:

My setup might not be similar to what others do and while unlikely, it could be the cause of all my problems. Here's a gist of my Dockerfile and k8s config file

Notice how the image is "empty" and only loads the Gemfile and then when the image gets loaded into the pod, a volume from the host is mounted on that image. That allows me to develop on my host in the same folder as all my other project while running everything through minikube.

Let me know if you need extra information, I'd be glad to help!

pier-oliviert commented 3 years ago

/reopen

k8s-ci-robot commented 3 years ago

@pothibo: Reopened this issue.

In response to [this](https://github.com/kubernetes/minikube/issues/1370#issuecomment-762258691): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
fejta-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

sharifelgamal commented 3 years ago

I'm going to go ahead and freeze this issue so it doesn't keep getting closed. That said, this is an issue with 9p itself and can't really be worked around unless we end up replacing it.