开发者

Slow Speeds when unzipping with PHP onto a NFS, how can I speed it up?

开发者 https://www.devze.com 2022-12-30 02:14 出处:网络
I\'m trying to figure out how to boost my NFS speed and php uploads. File is uploaded to the webserver\'s local tmp dir

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 proble开发者_运维知识库m.

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

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消