tags:

views:

56

answers:

1

Hi, I'm trying to figure out how to boost my NFS speed and php uploads.

  1. File is uploaded to the webserver's local tmp dir

  2. With PHP I copy the file userxxx.zip to the NFS

  3. With PHP I extract the userxxx.zip on the NFS to another dir on the NFS.

What I'm finding is the file is in Step 3, the file is being read through the NFS by the web server, processed by the web server, and uploaded back across the NFS.

Speeds as expected are very slow.

Might a possible solution be to get the Fileserver to extract the zip? a) Webserver copies the file to the NFS b) Webserver makes a web service call to the Fileserver c) Fileserver can now unzip the file like it's local and the speeds should be much faster.

I would appreciate any suggestion anyone how people have approached this problem.

(I'm aware that php ZipArchive() is very slow, and I'll likely use java or php exec unzip to speed it up)

Thanks

+2  A: 

Why not just leave the file in /tmp and unzip there and write the resulting files to the NFS?

Even if you want the zip file to end up on the NFS along with the unzipped files, you should unzip it while it is local BEFORE copying anything over to NFS. There is no reason to put it on NFS only to read it back off again.

SoapBox
Thanks. That will certainly help by removing a read step.
bunwich