NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Upload as .php~ then Rename .php (high-volume sites)


Joined: 06 Mar 2009
Posts: 5
Reply with quote
Maybe I'm thinking about this the wrong way...so I'll just explain the problem:

1) I start uploading index.php
2) Someone browses our website and gets a bunch of PHP errors
3) The upload finishes

For a high-volume site, having pages down (imagine common.inc), even for a fraction of a second, hurts. Here's what I think would be supurb:

1) I start uploading index.php, which is temporarily saved as index.php~
2) Someone browses our website and still gets the original index.php
3) The upload finishes and is renamed (rename index.php~ index.php) instantly

So there it is. Am I way off in my thinking? Is there a much easier solution that I'm missing? Can this be (easily) added into NuSphere PhpED?
View user's profileFind all posts by niaxilinSend private message


Joined: 25 Dec 2008
Posts: 21
Reply with quote
This would be great - even better if it was coupled with multiple-threaded uploading and all files renamed after all files uploaded.
View user's profileFind all posts by Disgruntled UserSend private message
Veteran

Joined: 22 May 2008
Posts: 141
Reply with quote
So long as its built where it doesnt overwrite files, say if there was already an index.php~ on the server.

I'm also waiting for multi-threaded ftp like FileZilla has. It would make phped much much better.
View user's profileFind all posts by simshaunSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
In most cases the bottleneck is network performance (bandwidth and latency). If the bandwidth is limited by the router (e.g. on ISP side) or by the server and they enforce the limit per connection, it's the only case when adding multiple threads may improve performance. In this case you can improve it by choosing appropriate ISP plan with wider bandwidth. With the other cases, adding more threads will only slowdown everything.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 22 May 2008
Posts: 141
Reply with quote
When you have hundreds (in my case a couple thousand) small images to download/upload, having 4 concurrent connections running simultaneously gets it done much faster than a single connection.

This is why I use FileZilla over NuSphere's FTP quite often on those sites because it saves time.
View user's profileFind all posts by simshaunSend private message


Joined: 14 Apr 2006
Posts: 33
Reply with quote
dmitri wrote:
In most cases the bottleneck is network performance (bandwidth and latency). If the bandwidth is limited by the router (e.g. on ISP side) or by the server and they enforce the limit per connection, it's the only case when adding multiple threads may improve performance. In this case you can improve it by choosing appropriate ISP plan with wider bandwidth. With the other cases, adding more threads will only slowdown everything.


This is perfectly true, however in my experience (and alot of others going by a thread elsewhere) the real bottle neck is the FTP code in PHPEd. Uploading the same files with a proper FTP client can be many, many times quicker.

_________________
Regards

Steve.
View user's profileFind all posts by MGSteveSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Oh, common!
Do you know any ftp client that runs faster than PhpED?
I compared with Filezilla and it apperead almost 30% slower than PhpED.
Regarding SFTP, filzilla is 2 times slower. Any other/better suggestions?
Try yourself with LOCAL ftp or sftp server to avoid NETWORK problems that I mentioned before and you'll get the same.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 14 Apr 2006
Posts: 33
Reply with quote
dmitri wrote:
Oh, common!
Do you know any ftp client that runs faster than PhpED?
I compared with Filezilla and it apperead almost 30% slower than PhpED.
Regarding SFTP, filzilla is 2 times slower. Any other/better suggestions?
Try yourself with LOCAL ftp or sftp server to avoid NETWORK problems that I mentioned before and you'll get the same.


Well, I did a basic test (I can record it on video and post it if you want...).

FlashFXP uploaded the test files (many files of various sizes) ALOT quicker than PHPEd's FTP Client.

_________________
Regards

Steve.
View user's profileFind all posts by MGSteveSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
"ALOT" is much more meaningfull than strict numbers Smile
Please provide whole the details about your test, such as number of files, total size, size of the biggest file, size of the smallest one, FTP server software, machine hw, the results (in seconds) for PhpED and alternatives.
It's better to have the same FTP server as you run on your life server.

I'll post my resutls too.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
FTP: vsftpd 2.0.5
Server OS: CentOS 5.1 (vmware 6)
HW: Core2Duo/3GHz/2GB RAM

Filezilla 3.2.3
PhpED 5.6.5637

Files: Joomla Package
total size: 13'418'716
the smallest: 15
the biggest: 294'042
number of files: 3933

timings (ran 3 times): PhpED 26-29s, FileZilla 34-35s,
PhpED is >17% faster.

I'd note that with PhpED CPU usage was about 30% and less which would allow me to work.
With FileZilla CPU utilization was quckly jumping from 60% to 100% and back. It would hardly let me to work (if I wanted).

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Mar 2009
Posts: 5
Reply with quote
Not to interrupt the speed comparisons, but I found the best solution for us was to create a development site on the remote web server and then rsync the changes after we were done tweaking and testing. I don't know why it took so long to figure that one out. A temporary rename would still be useful for some folks apparently. :::looks up:::

Ok, please continue now!
View user's profileFind all posts by niaxilinSend private message
Veteran

Joined: 22 May 2008
Posts: 141
Reply with quote
Not to insult your intelligence dmitri, but you are you basing your test with both clients running single connections? Some FTP servers only allow single connections by the way.
I thought the whole point of this side-tracked thread was the comparison of multiple-connections vs single connections, not the performance of the FTP client itself.

I use FileZilla with up to 5 concurrent connections to my dedicated's, and it always uploads/downloads faster so long as I'm dealing with lots of small files because its doing 5 at a time whereas PHPEd is only doing 1 at a time.
Also, I have no problems running FileZilla at all with other intensive applications running (Photoshop, Illustrator, Flash, Dreamweaver, PHPEd), and my computer is not that snazzy.

I'll get some stats on the FTP (single connection in PHPEd/vs multiple connections in FileZilla) when I get a free moment later as I'm at work now.
View user's profileFind all posts by simshaunSend private message
Upload as .php~ then Rename .php (high-volume sites)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 3  

  
  
 Reply to topic