LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-17-2012, 07:15 AM   #1
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Rep: Reputation: 0
upload / download difference on network shares


I have a Red Hat Enterprise Linux 6 (with SELinux) which shows significant differences of speed between download and upload (the latter significantly slower) of files shared over the LAN.

The bottleneck seems to be the output of the linux machine since I have a rate around 1Mb/s
  • when WinXP machines download files shared (using samba) by the RHEL machine
  • uploading files from the RHEL to a WinXP's shared folder

while
  • uploading from the XP machines to linux's shares
  • downloading XPs' shares on the RHEL
  • any share between Windows machines only

run smooth (around 50Mb/s). Since the upload from RHEL to WinXP's share is slowed too I would exclude an issue in the configuration of samba.

What could possibly determine this limit in the upload speed?

If you need more info, please, ask.

Last edited by Batsu; 12-19-2012 at 08:16 AM.
 
Old 12-19-2012, 02:40 AM   #2
solarisguy
LQ Newbie
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 28

Rep: Reputation: 8
Quote:
Originally Posted by Batsu View Post
I have a Red Hat Enterprise Linux 6 (with SELinux) which shows significant differences of speed between download and upload (the latter significantly slower) of files shared over the LAN.

The bottleneck seems to be the output of the linux machine since I have a rate around 1Mb/s
  • when WinXP machines download files shared (using samba) by the RHEL machine
  • uploading files from the RHEL to a WinXP's shared folder

while
  • ploading from the XP machines to linux's shares
  • downloading XPs' shares on the RHEL
  • any share between Windows machines only

run smooth (around 50Mb/s). Since the upload from RHEL to WinXP's share is slowed too I would exclude an issue in the configuration of samba.

What could possibly determine this limit in the upload speed?

If you need more info, please, ask.
Is iptables running on the Linux system? (iptables -L) Typically the INPUT chain puts network traffic through more filters than the OUTPUT chain.
 
Old 12-19-2012, 08:27 AM   #3
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by solarisguy View Post
Is iptables running on the Linux system?
Yeah, but there are no rules concerning the output traffic.


Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-ns
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-dgm
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:netbios-ssn
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:microsoft-ds
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-ns
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-dgm
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
Old 12-20-2012, 02:52 AM   #4
solarisguy
LQ Newbie
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 28

Rep: Reputation: 8
Quote:
Originally Posted by Batsu View Post
Yeah, but there are no rules concerning the output traffic.


Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-ns
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-dgm
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:netbios-ssn
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:microsoft-ds
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-ns
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:netbios-dgm
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Try turning off iptables to see if it makes a difference, just to rule the firewall out as the source of the problem. It could be something goofy with connection tracking.
 
Old 12-20-2012, 03:30 AM   #5
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by solarisguy View Post
Try turning off iptables to see if it makes a difference, just to rule the firewall out as the source of the problem. It could be something goofy with connection tracking.
Nope, the output is still slow...
 
Old 12-20-2012, 08:32 PM   #6
solarisguy
LQ Newbie
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 28

Rep: Reputation: 8
Quote:
Originally Posted by Batsu View Post
Nope, the output is still slow...
Hmm, I wonder if it could be a filesystem issue. What filesystem are you using? Reads should be performing faster than writes, but I have seen stranger things.

Also, have you turned Samba debug logging up?
 
Old 12-21-2012, 03:24 AM   #7
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by solarisguy View Post
Hmm, I wonder if it could be a filesystem issue. What filesystem are you using? Reads should be performing faster than writes, but I have seen stranger things.

Also, have you turned Samba debug logging up?
the problem arises also when I upload files from the REHL to mounted windows shared folders, so I would not blame samba.

Code:
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_xxx123456-lv_root
              ext4     50G  6.1G   41G  13% /
tmpfs        tmpfs    3.9G  936K  3.9G   1% /dev/shm
/dev/sda1     ext4    485M   37M  423M   8% /boot
/dev/mapper/vg_xxx123456-lv_home
              ext4    170G   11G  151G   7% /home


  --- Volume group ---
  VG Name               vg_xxx123456
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.39 GiB
  PE Size               4.00 MiB
  Total PE              59493
  Alloc PE / Size       59493 / 232.39 GiB
  Free  PE / Size       0 / 0
  VG UUID               vTErCw-mjdN-V5fi-0uki-dMc3-xlcV-42SdcB


  --- Logical volume ---
  LV Name                /dev/vg_xxx000000/lv_root
  VG Name                vg_xxx123456
  LV UUID                SpafdA-RD3a-EteT-rm46-s6yl-IuNk-Bkzv8y
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg_xxx123456/lv_home
  VG Name                vg_xxx123456
  LV UUID                aW9eqx-u4Lt-yqAn-fLx2-cIQe-3uEf-wr6Eah
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                172.60 GiB
  Current LE             44185
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Name                /dev/vg_xxx123456/lv_swap
  VG Name                vg_xxx123456
  LV UUID                ma59me-RKTm-SnL0-Svo4-jntp-oICX-tD3GbB
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                9.80 GiB
  Current LE             2508
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
(names scrambled to avoid revealing bla bla bla... corporate stuff)

I'm no expert about LVM, but could it be the read is affected by the fragmentation of physical extensions?

Last edited by Batsu; 12-21-2012 at 03:27 AM. Reason: typo
 
Old 12-24-2012, 12:14 AM   #8
solarisguy
LQ Newbie
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 28

Rep: Reputation: 8
Quote:
Originally Posted by Batsu View Post
the problem arises also when I upload files from the REHL to mounted windows shared folders, so I would not blame samba.

Code:
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_xxx123456-lv_root
              ext4     50G  6.1G   41G  13% /
tmpfs        tmpfs    3.9G  936K  3.9G   1% /dev/shm
/dev/sda1     ext4    485M   37M  423M   8% /boot
/dev/mapper/vg_xxx123456-lv_home
              ext4    170G   11G  151G   7% /home


  --- Volume group ---
  VG Name               vg_xxx123456
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.39 GiB
  PE Size               4.00 MiB
  Total PE              59493
  Alloc PE / Size       59493 / 232.39 GiB
  Free  PE / Size       0 / 0
  VG UUID               vTErCw-mjdN-V5fi-0uki-dMc3-xlcV-42SdcB


  --- Logical volume ---
  LV Name                /dev/vg_xxx000000/lv_root
  VG Name                vg_xxx123456
  LV UUID                SpafdA-RD3a-EteT-rm46-s6yl-IuNk-Bkzv8y
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg_xxx123456/lv_home
  VG Name                vg_xxx123456
  LV UUID                aW9eqx-u4Lt-yqAn-fLx2-cIQe-3uEf-wr6Eah
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                172.60 GiB
  Current LE             44185
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Name                /dev/vg_xxx123456/lv_swap
  VG Name                vg_xxx123456
  LV UUID                ma59me-RKTm-SnL0-Svo4-jntp-oICX-tD3GbB
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                9.80 GiB
  Current LE             2508
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
(names scrambled to avoid revealing bla bla bla... corporate stuff)

I'm no expert about LVM, but could it be the read is affected by the fragmentation of physical extensions?
Are you seeing significant rw delays local to the linux system?

Code:
# Measure write speed
dd if=/dev/zero of=/home/outfile count=512 bs=1024k

# Measure read speed
dd if=/home/outfile of=/dev/null bs=4096k
Do you have SELinux enabled by chance?
 
Old 01-21-2013, 07:13 AM   #9
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by solarisguy View Post
Are you seeing significant rw delays local to the linux system?

Code:
# Measure write speed
dd if=/dev/zero of=/home/outfile count=512 bs=1024k

# Measure read speed
dd if=/home/outfile of=/dev/null bs=4096k
This is the output running the speedtest, looks fair to me:
Code:
W:
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 10.4499 s, 103 MB/s
R:
256+0 records in
256+0 records out
1073741824 bytes (1.1 GB) copied, 0.182832 s, 5.9 GB/s

Quote:
Originally Posted by solarisguy View Post
Do you have SELinux enabled by chance?
Yes.

Sorry for the delay in the response, I could not use the machine for a while.
 
Old 01-21-2013, 07:56 AM   #10
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,919

Rep: Reputation: Disabled
You may want to rule out network issues before you start fine-tuning Samba. iperf will tell you if the poor performance you experience is network related or not (there's a Windows version as well).

Also, check the netmask on the RHEL system to make sure you're not inadvertently routing all outbound traffic through the default gateway.
 
Old 05-20-2013, 03:05 AM   #11
Batsu
LQ Newbie
 
Registered: Dec 2012
Distribution: Ubuntu, Xubuntu, RHEL
Posts: 6

Original Poster
Rep: Reputation: 0
Yeah, it turns out the network guy left an half-duplex cable somewhere along the path...
 
  


Reply

Tags
file sharing, rhel6, selinux, speed


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] download/upload manager for ssh on flaky network carolus Linux - Networking 3 11-28-2011 03:06 PM
Difference in behaviour, when shares are mounted as network drives on windows ajaygarg Red Hat 3 03-18-2010 04:28 AM
Any Tool which can monitor upload/ download in network? your_shadow03 Linux - Newbie 8 02-24-2010 07:27 AM
FTP Upload/Download SBN Linux - Server 1 11-13-2007 03:46 AM
hdd-related download problem(upload 4-5MB/s, download ~1MB/s) tine Linux - Hardware 4 09-15-2004 03:06 PM


All times are GMT -5. The time now is 01:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration