heys guys.
So… I have a website that needs to upload files like, 500MB large.
My question is… what kind of system requirements do I need? Specifically about memory. For uploading a 500MB file I need 500MB RAM? How much RAM will be necessary for ONE upload of that kind succeed?
PHP, or better the web server, will not buffer the whole upload in RAM.
Upload size depends not directly on RAM size. I cannot say what exactly your system should look like but I can say that I handled GB sized updates years ago with low cost work station.
Note that you’ll have to change the following php.ini settings if you want to support big uploads:
About memory again: Note that not PHP will consume the memory. The web server will handle the download. You won’t worry about this in PHP.
If you use a Linux system you can view the tcp buffer size when typing
in terminal. You’ll see 3 numbers. The minimum, medium and maximum buffer size in bytes. On my system it is:
Meaning that the maximum buffer size is ~3.9MB which is significantly smaller then the 500MB you have.
So don’t worry about memory in this case. Its is very likely that the network is the bottleneck.