Re: move_uploaded_file and CPU wait state (IO)
| From: | Curt Zirzow | Date: | Tue, 28 Feb 2006 01:39:41 +0000 |
| Subject: | Re: move_uploaded_file and CPU wait state (IO) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231177@lists.php.net to get a copy of this message | ||
On Mon, Feb 27, 2006 at 06:39:13PM +0100, phpmaillist@skodric.com wrote:
> 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.
I'm just taking a wild guess at this moment, but usually is a sign
when disk access is an issue and tends to be because it is rather
full excpecially with larger files.
Some questions that i that I would first look at:
- how much space is on /tmp or the drive you are moving it to
- is /tmp on the same drive as where ever you are moving it to.
- if it is the same drive, the move should be quick
- test a move directly on the filesystyem and see how long it takes
Just in case you arn't familiar with disk usage do a:
du -h
and observe the output.
>
> 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! :)
Although of what I mentioned really shouldn't explain your 40+ load
unless you are under requests and you are very close to 100% on one
of those disk partitions from 'du'.
> 2 x 80 GB IDE HDD
Since you have 2 disks i would suggest putting all your logging
information on one disk or the other and reserver the other disk
for accessing pages or uploads.
But then again it really doesn't explain the 40+ server load, you
may have other issues at hand.
Curt.
--
cat .signature: No such file or directory