You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Steve Luebbe <sl...@linoma.com> on 2008/11/05 23:09:13 UTC

Active vs Passive performance

Has anyone noticed a difference in performance between FTPing in Active 
mode vs. Passive mode?

I have two laptops on the same network:
1) Client - Windows Vista, firewall disabled, using FileZilla
2) Apache FTPServer - Windows XP, firewall disabled

When FileZilla is set to passive it is relatively fast.  When I switch 
it to active it is 2 times to 3 times slower. 

I've done quite a bit of research and playing around but I haven't been 
able to determine why.  I'm hoping someone can shed some light on this 
for me...

Thanks,
Steve

Re: Active vs Passive performance

Posted by David Latorre <dv...@gmail.com>.
Steve,
1.5 and 1.6 JREs and Windows Vista have had several issues and I guess there
are more to be fixed. (For instance, just this week I had to update to
1.6.0_7 in order to have Socket.getLocalAddress() return the correct IP
address - it didn't in 1.6.0_6)
I expected that 1.5.0_16 included all the available bugfixes. Otherwise,
they'll have to release  a new version, I hope that will be soon.

Taking this into account, are you using Vista in your "JRE 1.5 system" or
just in your  development machine? A five second delay between the PORT
command and the responde code is something much more people would have
noticed and I think it didn't happen with my Linux  server and JRE 1.5.0_15.
So it is quite possible that it is a Vista-only issue; my advice is (in case
your server is not  a Vista machine)   that you test this behaviour again in
your target OS.

As niklas said, probably there's little we can do here, but waiting for sun
to fix these issues.  Anyway let us know if you find a workaround! For data
connections we are not using MINA but regular synchronous sockets so the
code can be easily read or traced :)

cheers,
david





2008/11/7 Niklas Gustavsson <ni...@protocol7.com>

> On Fri, Nov 7, 2008 at 4:16 PM, Steve Luebbe <sl...@linoma.com> wrote:
> > Well I have good and bad news to report.  The good news is that we found
> out
> > why the active connection speed is slower.  The bad news is that it
> relates
> > to the version of JRE you are running.
> > With 1.5.0_16 JRE:
> > 1) Active connections are extremely slow
> > 2) If you browse a remote site and keep changing directories over and
> over
> > (ls) it will actually stop responding after  20+ commands or so.
> >
> > With JRE 1.6.0_07 everything seems to be working fine.
>
> Oh, that likely means that there might be limited ways for us to fix
> this, but we might find a workaround. Let's keep the bug report open
> and we'll see if we can reproduce the problem.
>
> /niklas
>

Re: Active vs Passive performance

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Fri, Nov 7, 2008 at 4:16 PM, Steve Luebbe <sl...@linoma.com> wrote:
> Well I have good and bad news to report.  The good news is that we found out
> why the active connection speed is slower.  The bad news is that it relates
> to the version of JRE you are running.
> With 1.5.0_16 JRE:
> 1) Active connections are extremely slow
> 2) If you browse a remote site and keep changing directories over and over
> (ls) it will actually stop responding after  20+ commands or so.
>
> With JRE 1.6.0_07 everything seems to be working fine.

Oh, that likely means that there might be limited ways for us to fix
this, but we might find a workaround. Let's keep the bug report open
and we'll see if we can reproduce the problem.

/niklas

Re: Active vs Passive performance

Posted by Steve Luebbe <sl...@linoma.com>.
Well I have good and bad news to report.  The good news is that we found 
out why the active connection speed is slower.  The bad news is that it 
relates to the version of JRE you are running. 

With 1.5.0_16 JRE:
1) Active connections are extremely slow
2) If you browse a remote site and keep changing directories over and 
over (ls) it will actually stop responding after  20+ commands or so.

With JRE 1.6.0_07 everything seems to be working fine.

Hopefully this information is good enough for you to go on and debug the 
problem.  We were planning on deploying Apache FTPServer with our 1.5 
JRE system but that will depend on what the outcome of this thread is.

Thanks,
Steve

David Latorre wrote:
> Hello,
>  This is a very odd behaviour indeed. Any way, we should congratulate
> ourselves that Apache FtpServer might perform as well as GlobalScape.
> Although it seems that globalscape can do much more things than us.
>
> How are you sending the files? It would be great if you could provide a test
> case (e.g., using commons net ftp) so other people can check this behaviour
> in their environment.
>
> David
>
>
> 2008/11/7 Erik Morton <ei...@gmail.com>
>
>   
>> I have observed similar results but I haven't tested it like this yet.
>>
>>
>> On Nov 6, 2008, at 5:30 PM, Steve Luebbe <sl...@linoma.com> wrote:
>>
>>  So, I've done a lot additional testing and here are the results.
>>     
>>> We currently have a GlobalScape FTP Server in our network up and running.
>>>  I ran two transfers to it, each with 35 small files, one in active and one
>>> in passive mode.  Both transfers took approx 3 seconds to complete.  Then I
>>> took Apache FTPServer and installed it on the same machine and ran the same
>>> tests to it.  Passive took 3 seconds and active took around 156 seconds.
>>>  This test eliminates my theory that it's network or pc related.
>>>
>>> Below is a small clip from the log file during the active transfer that
>>> took a long time.
>>>
>>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: PORT
>>> 192,168,1,213,194,107
>>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] SENT: 200 Command
>>> PORT okay.
>>>
>>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: STOR
>>> /PERFORMANCE/DB_CSV_FTP.XML
>>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] File upload :
>>> erick - /performance/db_csv_ftp.xml
>>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 150 File
>>> status okay; about to open data connection.
>>>
>>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 226
>>> Transfer complete.
>>>
>>> As you can see there is a 5 second delay in there only during Active
>>> connections.  If you need any additional information please let me know.
>>>
>>> Thanks in advance!!
>>> Steve
>>>
>>> Niklas Gustavsson wrote:
>>>
>>>       
>>>> On Wed, Nov 5, 2008 at 11:09 PM, Steve Luebbe <sl...@linoma.com>
>>>> wrote:
>>>>
>>>>  Has anyone noticed a difference in performance between FTPing in Active
>>>>         
>>>>> mode
>>>>> vs. Passive mode?
>>>>>
>>>>> I have two laptops on the same network:
>>>>> 1) Client - Windows Vista, firewall disabled, using FileZilla
>>>>> 2) Apache FTPServer - Windows XP, firewall disabled
>>>>>
>>>>> When FileZilla is set to passive it is relatively fast.  When I switch
>>>>> it to
>>>>> active it is 2 times to 3 times slower.
>>>>> I've done quite a bit of research and playing around but I haven't been
>>>>> able
>>>>> to determine why.  I'm hoping someone can shed some light on this for
>>>>> me...
>>>>>
>>>>>
>>>>>           
>>>> Do you see the same behavior with other clients? I can't see anything
>>>> obvious in our code that would cause this but I don't have any numbers
>>>> to back that we don't have a problem in this area.
>>>>
>>>> /niklas
>>>>
>>>> __________ Information from ESET NOD32 Antivirus, version of virus
>>>> signature database 3592 (20081106) __________
>>>>
>>>> The message was checked by ESET NOD32 Antivirus.
>>>>
>>>> http://www.eset.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3592 (20081106) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>   

Re: Active vs Passive performance

Posted by David Latorre <dv...@gmail.com>.
Hello,
 This is a very odd behaviour indeed. Any way, we should congratulate
ourselves that Apache FtpServer might perform as well as GlobalScape.
Although it seems that globalscape can do much more things than us.

How are you sending the files? It would be great if you could provide a test
case (e.g., using commons net ftp) so other people can check this behaviour
in their environment.

David


2008/11/7 Erik Morton <ei...@gmail.com>

> I have observed similar results but I haven't tested it like this yet.
>
>
> On Nov 6, 2008, at 5:30 PM, Steve Luebbe <sl...@linoma.com> wrote:
>
>  So, I've done a lot additional testing and here are the results.
>>
>> We currently have a GlobalScape FTP Server in our network up and running.
>>  I ran two transfers to it, each with 35 small files, one in active and one
>> in passive mode.  Both transfers took approx 3 seconds to complete.  Then I
>> took Apache FTPServer and installed it on the same machine and ran the same
>> tests to it.  Passive took 3 seconds and active took around 156 seconds.
>>  This test eliminates my theory that it's network or pc related.
>>
>> Below is a small clip from the log file during the active transfer that
>> took a long time.
>>
>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: PORT
>> 192,168,1,213,194,107
>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] SENT: 200 Command
>> PORT okay.
>>
>> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: STOR
>> /PERFORMANCE/DB_CSV_FTP.XML
>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] File upload :
>> erick - /performance/db_csv_ftp.xml
>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 150 File
>> status okay; about to open data connection.
>>
>> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 226
>> Transfer complete.
>>
>> As you can see there is a 5 second delay in there only during Active
>> connections.  If you need any additional information please let me know.
>>
>> Thanks in advance!!
>> Steve
>>
>> Niklas Gustavsson wrote:
>>
>>> On Wed, Nov 5, 2008 at 11:09 PM, Steve Luebbe <sl...@linoma.com>
>>> wrote:
>>>
>>>  Has anyone noticed a difference in performance between FTPing in Active
>>>> mode
>>>> vs. Passive mode?
>>>>
>>>> I have two laptops on the same network:
>>>> 1) Client - Windows Vista, firewall disabled, using FileZilla
>>>> 2) Apache FTPServer - Windows XP, firewall disabled
>>>>
>>>> When FileZilla is set to passive it is relatively fast.  When I switch
>>>> it to
>>>> active it is 2 times to 3 times slower.
>>>> I've done quite a bit of research and playing around but I haven't been
>>>> able
>>>> to determine why.  I'm hoping someone can shed some light on this for
>>>> me...
>>>>
>>>>
>>> Do you see the same behavior with other clients? I can't see anything
>>> obvious in our code that would cause this but I don't have any numbers
>>> to back that we don't have a problem in this area.
>>>
>>> /niklas
>>>
>>> __________ Information from ESET NOD32 Antivirus, version of virus
>>> signature database 3592 (20081106) __________
>>>
>>> The message was checked by ESET NOD32 Antivirus.
>>>
>>> http://www.eset.com
>>>
>>>
>>>
>>>
>>>

Re: Active vs Passive performance

Posted by Erik Morton <ei...@gmail.com>.
I have observed similar results but I haven't tested it like this yet.

On Nov 6, 2008, at 5:30 PM, Steve Luebbe <sl...@linoma.com> wrote:

> So, I've done a lot additional testing and here are the results.
>
> We currently have a GlobalScape FTP Server in our network up and  
> running.  I ran two transfers to it, each with 35 small files, one  
> in active and one in passive mode.  Both transfers took approx 3  
> seconds to complete.  Then I took Apache FTPServer and installed it  
> on the same machine and ran the same tests to it.  Passive took 3  
> seconds and active took around 156 seconds.  This test eliminates my  
> theory that it's network or pc related.
>
> Below is a small clip from the log file during the active transfer  
> that took a long time.
>
> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED:  
> PORT 192,168,1,213,194,107
> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] SENT: 200  
> Command PORT okay.
>
> [ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED:  
> STOR /PERFORMANCE/DB_CSV_FTP.XML
> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] File  
> upload : erick - /performance/db_csv_ftp.xml
> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 150  
> File status okay; about to open data connection.
>
> [ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 226  
> Transfer complete.
>
> As you can see there is a 5 second delay in there only during Active  
> connections.  If you need any additional information please let me  
> know.
>
> Thanks in advance!!
> Steve
>
> Niklas Gustavsson wrote:
>> On Wed, Nov 5, 2008 at 11:09 PM, Steve Luebbe <sl...@linoma.com>  
>> wrote:
>>
>>> Has anyone noticed a difference in performance between FTPing in  
>>> Active mode
>>> vs. Passive mode?
>>>
>>> I have two laptops on the same network:
>>> 1) Client - Windows Vista, firewall disabled, using FileZilla
>>> 2) Apache FTPServer - Windows XP, firewall disabled
>>>
>>> When FileZilla is set to passive it is relatively fast.  When I  
>>> switch it to
>>> active it is 2 times to 3 times slower.
>>> I've done quite a bit of research and playing around but I haven't  
>>> been able
>>> to determine why.  I'm hoping someone can shed some light on this  
>>> for me...
>>>
>>
>> Do you see the same behavior with other clients? I can't see anything
>> obvious in our code that would cause this but I don't have any  
>> numbers
>> to back that we don't have a problem in this area.
>>
>> /niklas
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus  
>> signature database 3592 (20081106) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>>

Re: Active vs Passive performance

Posted by Steve Luebbe <sl...@linoma.com>.
So, I've done a lot additional testing and here are the results.

We currently have a GlobalScape FTP Server in our network up and 
running.  I ran two transfers to it, each with 35 small files, one in 
active and one in passive mode.  Both transfers took approx 3 seconds to 
complete.  Then I took Apache FTPServer and installed it on the same 
machine and ran the same tests to it.  Passive took 3 seconds and active 
took around 156 seconds.  This test eliminates my theory that it's 
network or pc related.

Below is a small clip from the log file during the active transfer that 
took a long time.

[ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: PORT 
192,168,1,213,194,107
[ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] SENT: 200 
Command PORT okay.

[ INFO] 2008-11-06 12:19:32,828 [erick] [192.168.1.213] RECEIVED: STOR 
/PERFORMANCE/DB_CSV_FTP.XML
[ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] File upload : 
erick - /performance/db_csv_ftp.xml
[ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 150 File 
status okay; about to open data connection.

[ INFO] 2008-11-06 12:19:37,328 [erick] [192.168.1.213] SENT: 226 
Transfer complete.

As you can see there is a 5 second delay in there only during Active 
connections.  If you need any additional information please let me know.

Thanks in advance!!
Steve

Niklas Gustavsson wrote:
> On Wed, Nov 5, 2008 at 11:09 PM, Steve Luebbe <sl...@linoma.com> wrote:
>   
>> Has anyone noticed a difference in performance between FTPing in Active mode
>> vs. Passive mode?
>>
>> I have two laptops on the same network:
>> 1) Client - Windows Vista, firewall disabled, using FileZilla
>> 2) Apache FTPServer - Windows XP, firewall disabled
>>
>> When FileZilla is set to passive it is relatively fast.  When I switch it to
>> active it is 2 times to 3 times slower.
>> I've done quite a bit of research and playing around but I haven't been able
>> to determine why.  I'm hoping someone can shed some light on this for me...
>>     
>
> Do you see the same behavior with other clients? I can't see anything
> obvious in our code that would cause this but I don't have any numbers
> to back that we don't have a problem in this area.
>
> /niklas
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3592 (20081106) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>   

Re: Active vs Passive performance

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Nov 5, 2008 at 11:09 PM, Steve Luebbe <sl...@linoma.com> wrote:
> Has anyone noticed a difference in performance between FTPing in Active mode
> vs. Passive mode?
>
> I have two laptops on the same network:
> 1) Client - Windows Vista, firewall disabled, using FileZilla
> 2) Apache FTPServer - Windows XP, firewall disabled
>
> When FileZilla is set to passive it is relatively fast.  When I switch it to
> active it is 2 times to 3 times slower.
> I've done quite a bit of research and playing around but I haven't been able
> to determine why.  I'm hoping someone can shed some light on this for me...

Do you see the same behavior with other clients? I can't see anything
obvious in our code that would cause this but I don't have any numbers
to back that we don't have a problem in this area.

/niklas