[owncloud-user] Which is the best server configuration for ownCloud?

Roland Hager roland.hager at tu-berlin.de
Wed Feb 26 10:51:05 MET 2014

Hi Pierre,

On 26.02.2014 00:37, Pierre Malard wrote:
> [...]
>> One limitation has been that you need more memory than the largest 
>> file you sync, so if you sync a 4 gb file, you will need 4gb ram as 
>> it all gets loaded into there. This may have been solved with chunked 
>> uploads a while back, could someone confirm/deny?
> Wow!
> I don't think we have lot of these file. But I don't know how to test 
> that...
> However, the "free -h" showed before were take without any activity. 
> My "owncloud.log" is flat at this time...

As mentioned before you do NOT need a PHP memory_limit as high as the 
biggest file. We're fine with 512MB memory_limit and allow files with up 
to 20GB (yes GigaByte) in size. Check your "upload_tmp_dir" path in 
php.ini. This should point to a big enough partition. As also mentioned 
before all uploaded files are stored there until fully uploaded. If you 
have many active concurrent users uploading big files, the default /tmp 
or /var/tmp might be to small.

What about the memory consumption at all?

As I observed, PHP tends to never free memory once allocated. So if your 
PHP process has allocated the allowed maximum of memory it keeps 
allocated until the PHP process is recycled. Even if the process is not 
serving any requests. If you use FCGID, you might limit the number, 
livetime and "spare" processes to avoid having a high number of PHP 
processes with max memory usage. If you use mod_php you might tweak the 
corresponding prefork settings in apache webserver.

If you are running the MySQL on the same server, this one might use a 
lot of memory for the innodb_buffer_poolsize. You want to have as many 
data in buffer pool as possible, to reduce IO for the mysql server, but 
you must left enough memory for the system and the webserver. Check that 
there is enough RAM in case of maximum usage for the webserver and the 
mysql server. It is not helpfull if both are configured to use 100% of 
your RAM.

> [...]
> but, elsewere, if 5 users needs 1,5 Gb RAM, what about needed RAM for 50?
> [...]

Both, php processes and mysql server, does not necessarily need linear 
more RAM when serving more user. In a normal usage scenario a user does 
not permanently updates thousands of files and processes are often idle 
waiting for connections. The apache, php and mysql processes using 1.8GB 
of RAM might serve 5 users as well as 50users. The scenario where all of 
your 50 user initially sync their files at the same time, might be a 
problem, but should be rather rare.

Best regards
Roland Hager
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/user/attachments/20140226/3e3f274f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4666 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.owncloud.org/pipermail/user/attachments/20140226/3e3f274f/attachment-0001.p7s>

More information about the User mailing list