Samba Share slow on OpenVPN

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Samba Share slow on OpenVPN

Samba - General mailing list
Hi guys,

I have configured Samba share drives on my CentOS 7 VSI, and using OpenVPN
client for the users to access these shares from Windows or MAC.

While I am trying to upload/download heavy files (>500MB) it is very slow
in speed.

Any suggestions?

Thanks,
Shobhit Agarwal
--
Regards, Shobhit Agarwal +61-406528285
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: Samba Share slow on OpenVPN

Samba - General mailing list
On Wed, 13 Sep 2017 09:16:59 +0000
Shobhit Agarwal via samba <[hidden email]> wrote:

> Hi guys,
>
> I have configured Samba share drives on my CentOS 7 VSI, and using
> OpenVPN client for the users to access these shares from Windows or
> MAC.
>
> While I am trying to upload/download heavy files (>500MB) it is very
> slow in speed.
>
> Any suggestions?
>
> Thanks,
> Shobhit Agarwal

Yes, try giving us more info ;-)

Please post your smb.conf
Is it slow locally ? i.e. when not using OpenVPN

Rowland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: Samba Share slow on OpenVPN

Samba - General mailing list
In reply to this post by Samba - General mailing list
Almost certainly your OpenVPN connection is the problem - Samba will
serve files as fast as the link permits and is comparable to say ftp.

You could fiddle with OpenVPN first or you could do some real link
speed testing and then use that to inform your tuning.  That of course
assumes that your Samba implementation is optimal.  I assume that there
is no performance problem on site.

I would use something like iperf3 - https://iperf.fr/ to evaluate the
effects of changes made.  Make one change at a time and test.  Keep a
log of tests performed and changes made.  If you can, your first set of
tests should be across the internet link without OpenVPN to establish a
baseline.

Samba uses TCP for file sharing so make sure you test that.  Try to
control what else is running at the same time over the links.

There is no easy answer to your question and the only "fix" is by using
careful testing and a methodical approach.  Quite often you will get
answers this way far quicker than simply messing about blindly.

Cheers
Jon



On Wed, 2017-09-13 at 09:16 +0000, Shobhit Agarwal via samba wrote:

> Hi guys,
>
> I have configured Samba share drives on my CentOS 7 VSI, and using
> OpenVPN
> client for the users to access these shares from Windows or MAC.
>
> While I am trying to upload/download heavy files (>500MB) it is very
> slow
> in speed.
>
> Any suggestions?
>
> Thanks,
> Shobhit Agarwal
> --
> Regards, Shobhit Agarwal +61-406528285
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: Samba Share slow on OpenVPN

Samba - General mailing list
Hi Rowland/Jon,

When I am trying to upload/download the files without OpenVPN the speed is
coming as around 10 MB/s.

With OpenVPN it gets reduced to less than 1 MB/s.

Below is my smb.conf details

[global]
        workgroup = WORKGROUP
        server string = Samba Server
        dns proxy = no
        max log size = 1000
        panic action = /usr/share/samba/panic-action %d
        netbios name = centos
        passdb backend = tdbsam
        #hosts allow = 127.0.0.0/8 192.168.23.0/26
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
        #min receivefile size = 16384
        #se sendfile = true
        aio read size = 16384
        aio write size = 16384
        aio write behind = true
        max xmit = 65535
        log level = 1
        read raw = yes
        write raw = yes
        oplocks = yes
        deadtime = 15
        getwd cache = yes
        log file = /var/log/samba/log.%m
        load printers = no
        printing = bsd
        printcap name = /dev/null
        disable spoolss = yes
        reset on zero vc = yes
        security = user
        unix extensions = no
        wide links = yes

        strict allocate = Yes
        allocation roundup size = 4096
        server signing = no
        strict locking = no
        #socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072
SO_SNDBUF=131072
        use sendfile = Yes



[Shared]

        path = /Shared
        browsable = yes
        writable = yes
        guest ok = yes
        read only = no
        force user = nobody

Please help me how to increase the speed and how to test.

Regards,
Shobhit

On 13 September 2017 at 15:07, Jon Gerdes via samba <[hidden email]>
wrote:

> Almost certainly your OpenVPN connection is the problem - Samba will
> serve files as fast as the link permits and is comparable to say ftp.
>
> You could fiddle with OpenVPN first or you could do some real link
> speed testing and then use that to inform your tuning.  That of course
> assumes that your Samba implementation is optimal.  I assume that there
> is no performance problem on site.
>
> I would use something like iperf3 - https://iperf.fr/ to evaluate the
> effects of changes made.  Make one change at a time and test.  Keep a
> log of tests performed and changes made.  If you can, your first set of
> tests should be across the internet link without OpenVPN to establish a
> baseline.
>
> Samba uses TCP for file sharing so make sure you test that.  Try to
> control what else is running at the same time over the links.
>
> There is no easy answer to your question and the only "fix" is by using
> careful testing and a methodical approach.  Quite often you will get
> answers this way far quicker than simply messing about blindly.
>
> Cheers
> Jon
>
>
>
> On Wed, 2017-09-13 at 09:16 +0000, Shobhit Agarwal via samba wrote:
> > Hi guys,
> >
> > I have configured Samba share drives on my CentOS 7 VSI, and using
> > OpenVPN
> > client for the users to access these shares from Windows or MAC.
> >
> > While I am trying to upload/download heavy files (>500MB) it is very
> > slow
> > in speed.
> >
> > Any suggestions?
> >
> > Thanks,
> > Shobhit Agarwal
> > --
> > Regards, Shobhit Agarwal +61-406528285
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: Samba Share slow on OpenVPN

Samba - General mailing list
Am Donnerstag, 14. September 2017, 15:00:49 CEST schrieb Shobhit Agarwal via
samba:
> When I am trying to upload/download the files without OpenVPN the speed is
> coming as around 10 MB/s.
>
> With OpenVPN it gets reduced to less than 1 MB/s.
Did you tried to test transfer files with other protocols over OpenVPN - i.e.
FTP or at least secure copy (scp)  or SFTP? Do you use UDP or TCP?

I would assume that your OpenVPN config is suboptimal for your IP link  
(fragmented or similiar) - i.e. "playing" with mtu and mssfix etc. Be aware
that the choosen MTU suits to the selected crypto ciphers too.

Watch CPU load of the OpenVPN node to clearify if the CPU is a bottleneck too.


hth
good luck,


Niels.

--
 ---
 Niels Dettenbach
 Syndicat IT & Internet
 http://www.syndicat.com
 PGP: https://syndicat.com/pub_key.asc
 ---
 





--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba