About memory usage of apache2.x + php5.2x large file Upload

Source: Internet
Author: User
For more information about the memory usage of large file uploads in apache2.x + php5.2x, we have found that files are always cached in the memory when php uploads large files. Unlike asp.net, if it is exceeded, it will be written on the disk.

However, I did not find a significant increase in machine memory when using swfupload or traditional Upload.
Does php5 make improvements? Or why?
Sincerely ask for advice


Reply to discussion (solution)

I'm dizzy. what's wrong with this,

Move_uploaded_file ($ file ['tmp _ name'], $ new_file)
Name the temporary file uploaded to the server to the specified directory.

That's what happens after a temporary file is generated...
When this temporary file is generated, it is first stored in the memory, then written at one time, or written in segments. I don't know.

To put it bluntly, uploading 1 GB of files will occupy 1 GB of memory?

From my tests here, it won't take up so much, but the previous articles on the Internet will talk about it again. to ensure the accuracy of this information, I 'd like to ask

You can upload large files and view memory changes (such as imported files) through the task manager ).

Frankly speaking, I didn't find a satisfactory answer. I tried the solution you provided when I posted it.
However, my personal resources are limited and I cannot cover any platform of any version.
This test is not rigorous.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.