WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Transfer rate on the ftp server  (Read 13079 times)

Offline forsik

  • Newbie
  • *
  • Posts: 28
Transfer rate on the ftp server
« on: May 15, 2012, 12:15:23 PM »
Hello all

I would use a netbook with external usb drive as a NAS, but the data rate is poor.

I have a wifi router, the speed of data transmission between computers within network 802.11g  standard is about 6 megabytes per second. Both computers are on the same wifi network. One is windows (using total commander and a standard explorer to copy the data), on the other TC server.

Usb drive with the file system ntfs, on a computer running windows allows you to record data at speeds far greater than 6 megabytes per second.

Used bftpd demon with a standard configuration. To support the use of systems nfts nfts-3g. Also in the fuse and installed util-linux.

Is it possible to somehow speed up the data on the usb drive, or I want a lot of weak netbook?

copied to the disk fast enough

Code: [Select]
# du -sh file.tgz
4.1M    file.tgz

# time cp file.tgz /ftp
real    0m 0.96s
user    0m 0.00s
sys     0m 0.17s

What else can I check?
« Last Edit: May 15, 2012, 12:59:42 PM by forsik »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #1 on: May 15, 2012, 01:06:00 PM »
You didn't mention what rate are you getting?

ntfs-3g (any FUSE fs) by itself is not fast. If the drive is only accessed over network, maybe consider ext4?

You could also watch top while doing a transfer, to see if anything is using a lot of cpu.
The only barriers that can stop you are the ones you create yourself.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: Transfer rate on the ftp server
« Reply #2 on: May 15, 2012, 01:23:40 PM »
I create a backup copy of data in windows, using cobian backup, it creates several zip files, then copies them to the ftp, located on my netbook. Copy speed extremely slow, about 50-100 kilobits per second. The maximum speed of 500 kilobytes per second.

Htop says that ~ 60% of the load generates ntfs-3g driver

If using ext3 (ext4) creates a large increase in speed, then we can consider this option. However, I would like to first check whether this is.

upd: It looks like part of the problem is wifi connection. I do not know why, but when I used a wired connection, transmission speed has increased about 3 times, but it still is not more than 1.3 megabytes per second.
« Last Edit: May 15, 2012, 02:29:51 PM by forsik »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #3 on: May 15, 2012, 02:28:50 PM »
60% is a lot. But first test the upload speed with /ftp in RAM. If that goes fast, the bottleneck is on the disk side, if not, server and/or network.
The only barriers that can stop you are the ones you create yourself.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: Transfer rate on the ftp server
« Reply #4 on: May 15, 2012, 03:03:16 PM »
Code: [Select]
# blkid | grep sdb
/dev/sdb1: UUID="6054DA9E54DA766E" TYPE="ntfs"

# df -h | grep sdb
/dev/sdb1               232.9G    154.5G     78.4G  66% /ftp

$cd /ftp

$ time wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.6.tar.bz2
Connecting to www.kernel.org (149.20.4.69:80)
linux-3.3.6.tar.bz2  100% |*******************************| 77108k  0:00:00 ETA
real    1m 36.33s
user    0m 1.06s
sys     0m 12.05s

$ du -sh linux-3.3.6.tar.bz2
75.3M   linux-3.3.6.tar.bz2

75.3 / 96 = 0.78 mb/s ....
Downloading to the internal flash memory with ext3 is much slower.

another test

Code: [Select]
# time wget http://support.satgate.net/dl_test/dl/100MB.bin
Connecting to support.satgate.net (77.94.34.153:80)
100MB.bin            100% |*******************************|   100M  0:00:00 ETA
real    1m 19.67s
user    0m 0.73s
sys     0m 9.22s

# du -sh 100MB.bin
100.0M  100MB.bin

~ 1.27 mb/s
« Last Edit: May 15, 2012, 03:20:57 PM by forsik »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #5 on: May 16, 2012, 02:11:58 AM »
I mean in RAM.
Quote
sudo mount tmpfs /ftp -t tmpfs
#restart bftpd
#do the test transfer
sudo umount /ftp
The only barriers that can stop you are the ones you create yourself.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: Transfer rate on the ftp server
« Reply #6 on: May 16, 2012, 02:47:14 AM »
I ran some tests, the speed of Internet connections corresponds to the claimed my ISP (15 megabit is about 1.8 mb/s). But the speed within the same wifi network should not be limited to this value. I have a data transfer speed from computer to the server is an average of 900 kbit/s, when using RAM as /ftp. In this case, the most difficult process bftpd, and it consumes not more than ~ 20% CPU time. How else can I find out where in the limit?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #7 on: May 16, 2012, 03:11:34 AM »
Okay, that looks like both ntfs and your network are bottlenecks. I'd recommend some network bandwidth testers, but I don't know any that work on Windows too (they usually need two machines).
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11179
Re: Transfer rate on the ftp server
« Reply #8 on: May 16, 2012, 05:04:54 AM »
Hi forsik
You could boot the Windows machine which a Tinycore CD and try some ftp transfers with it.
That will tell you if Windows is limiting your transfer speed.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: Transfer rate on the ftp server
« Reply #9 on: May 16, 2012, 05:36:31 AM »
Yes,no problem,I'll try later to boot from the stick. What program do you advise me to check the speed in tc?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #10 on: May 16, 2012, 05:39:58 AM »
#machine 1
nc -l -p 7777 | dd > /dev/null

#machine 2, replace 1.1.1.1 with machine 1's IP
nc 1.1.1.1 7777 </dev/zero


ctrl-c after a while.
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11179
Re: Transfer rate on the ftp server
« Reply #11 on: May 16, 2012, 06:43:56 AM »
Quote
#machine 2, replace 1.1.1.1 with machine 1's IP
nc 1.1.1.1 7777 </dev/zero
If you do:
time nc -vv 1.1.1.1 7777 </dev/zero
You'll get elapsed time and bytes sent, no need to pipe through dd on machine 1.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Transfer rate on the ftp server
« Reply #12 on: May 16, 2012, 07:35:29 AM »
Right, thanks Rich. dd does give it already in MB/s form though ;)
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11179
Re: Transfer rate on the ftp server
« Reply #13 on: May 16, 2012, 07:55:00 AM »
Hi curaga
Thank you, I was not aware that dd gave that information. Should have suspected you'd done
something clever.

Offline forsik

  • Newbie
  • *
  • Posts: 28
Re: Transfer rate on the ftp server
« Reply #14 on: May 16, 2012, 09:09:52 AM »
Code: [Select]
# nc -l -p 7777 | dd > /dev/null
22783+8988 records in
22783+8988 records out

# time nc <ip> 7777 </dev/zero
^Cpunt!
Command terminated by signal 2
real     0m 28.14s
user    0m 0.00s
sys     0m 0.00s

Code: [Select]
# nc -l -p 7777 | dd > /dev/null
29881+11780 records in
29881+11780 records out

# time nc -vv <ip> 7777 </dev/zero
<ip> (<ip>:7777) open
^Csend 20176896, rcvd 0
punt!
Command terminated by signal 2
real     0m 36.73s
user    0m 0.00s
sys     0m 0.73s

Frankly, I do not understand what units of measurement that were measured, and what the resulting outcomes. (If I ever made)
« Last Edit: May 16, 2012, 09:25:51 AM by forsik »