move_uploaded_file and CPU wait state (IO)

From: Date: Mon, 27 Feb 2006 17:39:13 +0000
Subject: move_uploaded_file and CPU wait state (IO)
Groups: php.general 
Request: Send a blank email to php-general+get-231152@lists.php.net to get a copy of this message
Hi, My first mailing, if I'm in wrong group or such, let me know ;) Here comes my question. I have implemented file uploads to my server. At the end of upload, file is beeing moved from /tmp to permanent directory. However, whenever this happens, CPU goes berzerk and waits for disk to finish moving file. As allowed files may be up to 100 MB per file, having more then 3 users makes complete server freeze. Meantime, server load reaches skyhigh 40+. After file is moved, server resumes normal operation, however while moving file server is completely not responding. Is there a work around? I am not so good with linux (yet ^^), so I do not know if there is place for improvement on OS itself. I asked this question on Debian forum, but am trying here as well. If someone has same problem and prefferably solution, or even sugestions - all is welcome! :) Server P4 2.0 512 MB RAM (will be 2 GB by the end of the week) 2 x 80 GB IDE HDD Thank you! Regards, Aleksandar

« previous php.general (#231152) next »