Slow traffic over NAT Port Forwarding

Discussions related to using VirtualBox on Linux hosts.
Post Reply
chg
Posts: 1
Joined: 22. Nov 2022, 15:05

Slow traffic over NAT Port Forwarding

Post by chg »

Hello Everyone,
I tryed to check for a solution but the only thing i could find is to change the Interface Type, which i tried.

Heres my Problem: I want to send date to my VM, on my remote host-server, via SFTP. But the connection is very slow when sendig or getting date over NAT Port Forwarding. My Connection via NAT into the Internet is fast and not a problem.

SFTP put from Local-PC to Host
70.5MB/s
SFTP put from Local-PC to VM on host
2.2MB/s
SFTP get from Local-PC to VM on host
65.9MB/s

My Host-Server is running on Ubuntu 22.04.1 LTS with VirtualBox 7.0.4 and my VM is also running on Ubuntu 22.04.1 LTS, but it's the same effect on different VM's with e.g. Windows
(I have the same problem on multiple different Host-Server in different locations)

Code: Select all

Name:                        Samba_File03
Encryption:     disabled
Groups:                      /
Guest OS:                    Ubuntu 22.04 LTS (Jammy Jellyfish) (64-bit)
UUID:                        0fb5174a-5147-458b-9815-e5847e68584b
Config file:                 /home/VirtualBox VMs/Samba_File03/Samba_File03.vbox
Snapshot folder:             /home/VirtualBox VMs/Samba_File03/Snapshots
Log folder:                  /home/VirtualBox VMs/Samba_File03/Logs
Hardware UUID:               0fb5174a-5147-458b-9815-e5847e68584b
Memory size:                 2048MB
Page Fusion:                 disabled
VRAM size:                   16MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              2
PAE:                         enabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           enabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
BIOS NVRAM File:             /home/VirtualBox VMs/Samba_File03/Samba_File03.nvram
RTC:                         UTC
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 enabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
AMD-V Virt. Vmsave/Vmload:   enabled
IOMMU:                       None
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       running (since 2022-11-22T12:56:57.700000000)
Graphics Controller:         VMSVGA
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:
Teleporter Password:
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:
VM process priority:         default
Storage Controllers:
#0: 'IDE', Type: PIIX4, Instance: 0, Ports: 2 (max 2), Bootable
  Port 0, Unit 0: Empty
  Port 1, Unit 0: Empty
#1: 'SATA', Type: IntelAhci, Instance: 0, Ports: 4 (max 30), Bootable
  Port 0, Unit 0: UUID: dd8e13c6-889a-4eab-825d-cd85e33a7a0b
    Location: "/home/VirtualBox VMs/Samba_File03/Snapshots/{dd8e13c6-889a-4eab-825d-cd85e33a7a0b}.vdi"
  Port 1, Unit 0: UUID: e74ebf2a-e19c-4a65-9a38-c5bec96bfd1f
    Location: "/home/VirtualBox VMs/Samba_File03/Snapshots/{e74ebf2a-e19c-4a65-9a38-c5bec96bfd1f}.vdi"
  Port 2, Unit 0: UUID: f484ac15-7e56-4bd6-a6e2-27a84ac1ad91
    Location: "/home/VirtualBox VMs/Samba_File03/Snapshots/{f484ac15-7e56-4bd6-a6e2-27a84ac1ad91}.vdi"
  Port 3, Unit 0: UUID: 98b01873-2470-40d3-8c3a-08d003ac0908
    Location: "/home/VirtualBox VMs/Samba_File03/Snapshots/{98b01873-2470-40d3-8c3a-08d003ac0908}.vdi"
NIC 1:                       MAC: 080027D86102, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82543GC, 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 = , host port = 52222, guest ip = , guest port = 22
NIC 2:                       MAC: 080027056C51, 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:             USB Tablet
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: Default, Controller: AC97, Codec: AD1980)
Audio playback:              enabled
Audio capture:               disabled
Clipboard Mode:              disabled
Drag and drop Mode:          disabled
Session name:                headless
Video mode:                  800x600x32 at 0,0 enabled
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    enabled
xHCI USB:                    disabled
USB Device Filters:          <none>
Available remote USB devices: <none>
Currently attached USB devices: <none>
Bandwidth groups:            <none>
Shared folders:              <none>
VRDE Connection:             not active
Clients so far:              0
Recording enabled:           no
Recording screens:           1
 Screen 0:
    Enabled:                 yes
    ID:                      0
    Record video:            yes
    Destination:             File
    File:                    /home/VirtualBox VMs/Samba_File03/Samba_File03-screen0.webm
    Options:                 vc_enabled=true,ac_enabled=false,ac_profile=med
    Video dimensions:        1024x768
    Video rate:              512kbps
    Video FPS:               25fps
* Snapshots:
   Name: Base (UUID: 17af3364-24cf-46e6-908d-96a1b2b45773)
      Name: Snapshot 1 (UUID: 04a77bc3-a5dc-4929-889a-40c1a4029a21) *
* Guest:
Configured memory balloon:   0MB
OS type:                     Linux26_64
Additions run level:         1
Additions version:           6.0.0 r127566
Guest Facilities:
Facility "VirtualBox Base Driver": active/running (last update: 2022/11/22 11:10:44 UTC)
Facility "Seamless Mode": not active (last update: 2022/11/22 11:10:44 UTC)
Facility "Graphics Mode": not active (last update: 2022/11/22 11:10:44 UTC)
Please let me know if you need any more information or if there is some setting that I forgot.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Slow traffic over NAT Port Forwarding

Post by fth0 »

You didn't provid measurements between the host and the VM on the host. Does the slow traffic only occur when going through both NATs in a row? If yes, I'd use Wireshark on all three devices to analyze the behavior. Depending on the BDP (bandwidth delay product), you might also be interested in experimenting with Tuning TCP/IP Buffers for NAT.
Post Reply