LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2014, 03:05 AM   #1
informan
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Rep: Reputation: Disabled
lftp upload problem within wireless network


Dear all,

Recently, I use lftp as a ftp client to upload some files to ftp server on wireless network(dial with WCDMA/GSM modem),
I find the upload rate graph is different from other ftp client ,such as filezilla.

When wireless network signal is not very good, lftp rate graph look like a jaggies zigzag line, while filezilla

rate graph look like smoothly.

After I catching uploading wireshark log, I find the reason as below:

1)After tcp connection is created, lftp send lots of tcp packets to wireless modem and wait response, but now, wireless modem need much time to transfer these packets to ftp server, so lftp wait a lot of time to send next serial packets.

when I look rate graph on PC, its look like a jaggies zigzag line.

2) But filezilla send packets according the the real network environment, that is , when network signal is bad, its send

less packets, so waiting time is not very long.

How can I solve this problem? thanks
 
Old 01-28-2014, 03:30 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
lftp is a pretty simple client, and relies on the TCP subsystem in the TCP/IP stack to throttle the connection by adjusting the TCP window size and so on. The Linux kernel supports a number of different TCP congestion control algorithms, at perhaps the one used by your kernel isn't very well-suited for this particular scenario.

I don't know anything about FileZilla, but it may very well be "holding back" packets and do its own congestion control by, say, using a smaller TCP window size. That would explain why the transfer appears to go smoother. I wouldn't expect this to dramatically affect transfer times, but it would make the connection appear much less congested as the buffer in the modem isn't filled to capacity.

You could try switching to another TCP algorithm, if your kernel supports it. If you have a file called /proc/config.gz on your system, the command
Code:
zcat /proc/config.gz | grep TCP_CONG_
should produce a list of supported TCP congestion algorithms, and whether they're compiled as modules or directly into the kernel. You switch algorithms by echoing the name of the desired algorithm (for instance, "Vegas") to the /proc/sys/net/ipv4/tcp_congestion_control file. See this article for more details.

The real problem here is actually the buffer in the modem, which from what you're saying is way too large. Congested connections should be dropping packets, not putting them in a huge queue.
 
Old 01-29-2014, 02:50 AM   #3
informan
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

But I use lftp on windows with Cygwin platform, so I can not set TCP algorithm following your methods.

From your explanation, I guess if the lftp's upload algorithm is not suitable for Windows, but suitable for Linux ?

If that is true, I need to try other ftp clients.
 
Old 01-29-2014, 02:56 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Like most TCP applications, lftp doesn't use a specific algorithm. It just feeds data to a TCP connection, and leaves it to the IP stack of the operating system to adjust window sizes and throttle transfer speed.

Since the host OS is in fact Windows, there is (AFAIK) little you can do to change the behaviour of the TCP subsystem in the IP stack. A different and more advanced client that overrides the local IP stack and performs its own queuing and throttling would be one solution.

Another approach would be to install an application that can queue, prioritize and throttle all IP traffic from a Windows host, such as NetLimiter. Yet another would be to get a decent modem.
 
Old 01-29-2014, 03:10 AM   #5
informan
LQ Newbie
 
Registered: Jan 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
I try a lot of lftp settings, but it doesn't work, such as "set sftp:max-packets-in-flight 16"

If I use "set net:limit-rate" to limit the max rate to suit the modem real rate, such as 100Kbps, the upload rate graph become smoother.

But limit rate is not a better method, because of wireless rate is dynamic.

So...
 
  


Reply



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
lftp upload sycamorex Linux - Networking 11 05-25-2013 02:22 PM
FTP Upload Scripts Using lftp pricejm Linux - General 5 08-26-2012 03:32 PM
lftp to upload file pritisolanki Linux - Newbie 2 03-20-2009 07:59 AM
problem in lftp gopi_raghu Linux - Software 2 02-08-2007 05:31 AM
lftp problem bipins1979 Linux - General 1 06-21-2006 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration