Which is the best server configuration for ownCloud?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Which is the best server configuration for ownCloud?

MTD-3
Hi,

We have, since 2 years, an owncloud service on our institute network. Now, we want to generalize its usage but we have some interrogation about the best configuration.

The system works on virtual XEN server with Debian Wheezy. The test configuration is this:
- 2 CPU (i7)
- RAM : 4096 Mo
- Storage area: NFS mont on a low-cast SAN SATA.

With about 5 or 6 users, the memory is alway to 90%. So what could be this charge with 150 or 300 users?

is it because the IO access to NFS storage is too poor?

Best whishes

-- 
Pierre Malard

   «A force de faire "la rue" on est devenu le caniveau»
                                                  Abd Al Malik - Céline
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Nicolas Zedde
On 02/25/2014 4:52 PM, Pierre Malard wrote :

> Hi,
>
> We have, since 2 years, an owncloud service on our institute network. Now,
> we want to generalize its usage but we have some interrogation about the
> best configuration.
>
> The system works on virtual XEN server with Debian Wheezy. The test
> configuration is this:
> - 2 CPU (i7)
> - RAM : 4096 Mo
> - Storage area: NFS mont on a low-cast SAN SATA.
>
> With about 5 or 6 users, the memory is alway to 90%. So what could be this
> charge with 150 or 300 users?
>
> is it because the IO access to NFS storage is too poor?
>
> Best whishes


Hi Pierre,

Memory usage seems very high on your server compared to the number of users.
Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)

Regards,

Nicolas
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

MTD-3
Le 25 févr. 2014 à 18:07, Nicolas Zedde <[hidden email]> a écrit :

> On 02/25/2014 4:52 PM, Pierre Malard wrote :
>> We have, since 2 years, an owncloud service on our institute network. Now,
>> we want to generalize its usage but we have some interrogation about the
>> best configuration.
>>
>> The system works on virtual XEN server with Debian Wheezy. The test
>> configuration is this:
>> - 2 CPU (i7)
>> - RAM : 4096 Mo
>> - Storage area: NFS mont on a low-cast SAN SATA.
>>
>> With about 5 or 6 users, the memory is alway to 90%. So what could be this
>> charge with 150 or 300 users?
>>
>> is it because the IO access to NFS storage is too poor?
>
>
> Memory usage seems very high on your server compared to the number of users.
> Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
> Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
> What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)
That's ok, look the mem usage:
localu@nuage:~# free
             total       used       free     shared    buffers     cached
Mem:       4190044    3850664     339380          0     344996    1976800
-/+ buffers/cache:    1528868    2661176
Swap:      1048568       7260    1041308

I have increase memory allocated to this virtual machine (first test with 512 Mb) because we had a lot of strange error messages during synchronizations (not enought space left, …). As I saw the CPU usage were also full, I decide to gave 2 CPU. Now, the CPU usage is normal.

A explanation of memory usage with only 5 to 7 testings users could be that we have 2 ownCloud services: one for production usage and one for testing the new versions. The first one is on ownCloud v5.0.14a and the second on on last v6.0.1.

All ours user use this repository with all fonctionalities (data storage, calandar, …). The disk space allocated is from 500 Mb to 7 Gb per user. Every connections are done on our LDAP service.

When I'm take a look with "top", I can see that CPU usage is:
1st : apache
2nd : mysql
3rd : fail2ban

the memory usage top is:
1st : clamd
2nd : mysql
3rd : apache

If I talk about disk performance on my first mail, it's because the synchronization can be very hard and our data storage is, actualy, on a low Sata SAN. On the past, when we had only 1024 Mb of RAM, I have lots data during synchronizations following errors. I don't want ours users have the same problem.

So, my question can be:
If we have a lot of real users (about 50 concurents access to 300 users) which is the best configuration to our server?
- how many CPU dedicated?
- how many RAM?
- Sata disks or FC?

If someone have experience...

Regards

--
Pierre Malard

   « La liberté de la presse ne s'use que lorsqu'on ne s'en sert pas ! »
                                                  Slogan du "Canard enchaîné"
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Michael
Could you do a 'free -h', my eyes don't read bytes :-)

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?

Owncloud in my installation doesn't use a crazy amount of RAM.

At the risk of sounding rude, here is an explanation of the output of free:
The output is often confusing to people who haven't used it much, as it looks like all RAM is used. If this isn't the case in your installation, please ignore and assume that this link is for someone else looking at the mailing list without this knowledge :-)

Michael


On Tue, Feb 25, 2014 at 2:27 PM, Pierre Malard <[hidden email]> wrote:
Le 25 févr. 2014 à 18:07, Nicolas Zedde <[hidden email]> a écrit :
> On 02/25/2014 4:52 PM, Pierre Malard wrote :
>> We have, since 2 years, an owncloud service on our institute network. Now,
>> we want to generalize its usage but we have some interrogation about the
>> best configuration.
>>
>> The system works on virtual XEN server with Debian Wheezy. The test
>> configuration is this:
>> - 2 CPU (i7)
>> - RAM : 4096 Mo
>> - Storage area: NFS mont on a low-cast SAN SATA.
>>
>> With about 5 or 6 users, the memory is alway to 90%. So what could be this
>> charge with 150 or 300 users?
>>
>> is it because the IO access to NFS storage is too poor?
>
>
> Memory usage seems very high on your server compared to the number of users.
> Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
> Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
> What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)

That's ok, look the mem usage:
localu@nuage:~# free
             total       used       free     shared    buffers     cached
Mem:       4190044    3850664     339380          0     344996    1976800
-/+ buffers/cache:    1528868    2661176
Swap:      1048568       7260    1041308

I have increase memory allocated to this virtual machine (first test with 512 Mb) because we had a lot of strange error messages during synchronizations (not enought space left, …). As I saw the CPU usage were also full, I decide to gave 2 CPU. Now, the CPU usage is normal.

A explanation of memory usage with only 5 to 7 testings users could be that we have 2 ownCloud services: one for production usage and one for testing the new versions. The first one is on ownCloud v5.0.14a and the second on on last v6.0.1.

All ours user use this repository with all fonctionalities (data storage, calandar, …). The disk space allocated is from 500 Mb to 7 Gb per user. Every connections are done on our LDAP service.

When I'm take a look with "top", I can see that CPU usage is:
1st : apache
2nd : mysql
3rd : fail2ban

the memory usage top is:
1st : clamd
2nd : mysql
3rd : apache

If I talk about disk performance on my first mail, it's because the synchronization can be very hard and our data storage is, actualy, on a low Sata SAN. On the past, when we had only 1024 Mb of RAM, I have lots data during synchronizations following errors. I don't want ours users have the same problem.

So, my question can be:
If we have a lot of real users (about 50 concurents access to 300 users) which is the best configuration to our server?
- how many CPU dedicated?
- how many RAM?
- Sata disks or FC?

If someone have experience...

Regards

--
Pierre Malard

   « La liberté de la presse ne s'use que lorsqu'on ne s'en sert pas ! »
                                                  Slogan du "Canard enchaîné"
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user



_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

hippykilla
Me thinks this is going to be a big issue. 

Derek Broes




On Tue, Feb 25, 2014 at 2:25 PM, Michael <[hidden email]> wrote:
Could you do a 'free -h', my eyes don't read bytes :-)

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?

Owncloud in my installation doesn't use a crazy amount of RAM.

At the risk of sounding rude, here is an explanation of the output of free:
The output is often confusing to people who haven't used it much, as it looks like all RAM is used. If this isn't the case in your installation, please ignore and assume that this link is for someone else looking at the mailing list without this knowledge :-)

Michael


On Tue, Feb 25, 2014 at 2:27 PM, Pierre Malard <[hidden email]> wrote:
Le 25 févr. 2014 à 18:07, Nicolas Zedde <[hidden email]> a écrit :
> On 02/25/2014 4:52 PM, Pierre Malard wrote :
>> We have, since 2 years, an owncloud service on our institute network. Now,
>> we want to generalize its usage but we have some interrogation about the
>> best configuration.
>>
>> The system works on virtual XEN server with Debian Wheezy. The test
>> configuration is this:
>> - 2 CPU (i7)
>> - RAM : 4096 Mo
>> - Storage area: NFS mont on a low-cast SAN SATA.
>>
>> With about 5 or 6 users, the memory is alway to 90%. So what could be this
>> charge with 150 or 300 users?
>>
>> is it because the IO access to NFS storage is too poor?
>
>
> Memory usage seems very high on your server compared to the number of users.
> Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
> Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
> What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)

That's ok, look the mem usage:
localu@nuage:~# free
             total       used       free     shared    buffers     cached
Mem:       4190044    3850664     339380          0     344996    1976800
-/+ buffers/cache:    1528868    2661176
Swap:      1048568       7260    1041308

I have increase memory allocated to this virtual machine (first test with 512 Mb) because we had a lot of strange error messages during synchronizations (not enought space left, …). As I saw the CPU usage were also full, I decide to gave 2 CPU. Now, the CPU usage is normal.

A explanation of memory usage with only 5 to 7 testings users could be that we have 2 ownCloud services: one for production usage and one for testing the new versions. The first one is on ownCloud v5.0.14a and the second on on last v6.0.1.

All ours user use this repository with all fonctionalities (data storage, calandar, …). The disk space allocated is from 500 Mb to 7 Gb per user. Every connections are done on our LDAP service.

When I'm take a look with "top", I can see that CPU usage is:
1st : apache
2nd : mysql
3rd : fail2ban

the memory usage top is:
1st : clamd
2nd : mysql
3rd : apache

If I talk about disk performance on my first mail, it's because the synchronization can be very hard and our data storage is, actualy, on a low Sata SAN. On the past, when we had only 1024 Mb of RAM, I have lots data during synchronizations following errors. I don't want ours users have the same problem.

So, my question can be:
If we have a lot of real users (about 50 concurents access to 300 users) which is the best configuration to our server?
- how many CPU dedicated?
- how many RAM?
- Sata disks or FC?

If someone have experience...

Regards

--
Pierre Malard

   « La liberté de la presse ne s'use que lorsqu'on ne s'en sert pas ! »
                                                  Slogan du "Canard enchaîné"
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user



_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user



_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

MTD-3
In reply to this post by Michael
Le 25 févr. 2014 à 23:25, Michael <[hidden email]> a écrit :
Could you do a 'free -h', my eyes don't read bytes :-)

localu@nuage:~# free -h
             total       used       free     shared    buffers     cached
Mem:          4,0G       3,7G       279M         0B       395M       1,8G
-/+ buffers/cache:       1,5G       2,5G
Swap:         1,0G       7,1M       1,0G

;-)

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...


Owncloud in my installation doesn't use a crazy amount of RAM.

At the risk of sounding rude, here is an explanation of the output of free:
The output is often confusing to people who haven't used it much, as it looks like all RAM is used. If this isn't the case in your installation, please ignore and assume that this link is for someone else looking at the mailing list without this knowledge :-)

Ok, I understand, It would be better if I read documentation... ;-)

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


Michael


On Tue, Feb 25, 2014 at 2:27 PM, Pierre Malard <[hidden email]> wrote:
Le 25 févr. 2014 à 18:07, Nicolas Zedde <[hidden email]> a écrit :
> On 02/25/2014 4:52 PM, Pierre Malard wrote :
>> We have, since 2 years, an owncloud service on our institute network. Now,
>> we want to generalize its usage but we have some interrogation about the
>> best configuration.
>>
>> The system works on virtual XEN server with Debian Wheezy. The test
>> configuration is this:
>> - 2 CPU (i7)
>> - RAM : 4096 Mo
>> - Storage area: NFS mont on a low-cast SAN SATA.
>>
>> With about 5 or 6 users, the memory is alway to 90%. So what could be this
>> charge with 150 or 300 users?
>>
>> is it because the IO access to NFS storage is too poor?
>
>
> Memory usage seems very high on your server compared to the number of users.
> Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
> Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
> What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)

That's ok, look the mem usage:
localu@nuage:~# free
             total       used       free     shared    buffers     cached
Mem:       4190044    3850664     339380          0     344996    1976800
-/+ buffers/cache:    1528868    2661176
Swap:      1048568       7260    1041308

I have increase memory allocated to this virtual machine (first test with 512 Mb) because we had a lot of strange error messages during synchronizations (not enought space left, …). As I saw the CPU usage were also full, I decide to gave 2 CPU. Now, the CPU usage is normal.

A explanation of memory usage with only 5 to 7 testings users could be that we have 2 ownCloud services: one for production usage and one for testing the new versions. The first one is on ownCloud v5.0.14a and the second on on last v6.0.1.

All ours user use this repository with all fonctionalities (data storage, calandar, …). The disk space allocated is from 500 Mb to 7 Gb per user. Every connections are done on our LDAP service.

When I'm take a look with "top", I can see that CPU usage is:
1st : apache
2nd : mysql
3rd : fail2ban

the memory usage top is:
1st : clamd
2nd : mysql
3rd : apache

If I talk about disk performance on my first mail, it's because the synchronization can be very hard and our data storage is, actualy, on a low Sata SAN. On the past, when we had only 1024 Mb of RAM, I have lots data during synchronizations following errors. I don't want ours users have the same problem.

So, my question can be:
If we have a lot of real users (about 50 concurents access to 300 users) which is the best configuration to our server?
- how many CPU dedicated?
- how many RAM?
- Sata disks or FC?

If someone have experience...

Regards

--
Pierre Malard

   « La liberté de la presse ne s'use que lorsqu'on ne s'en sert pas ! »
                                                  Slogan du "Canard enchaîné"
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

-- 
Pierre Malard

   « Si, comme le disait le général de Gaule, la France n'avait pas été la
   France... on peut logiquement penser que tous les français auraient été
   des étrangers » ;-)
                                                                               Pierre Dac
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Diederik de Haas
On Wednesday 26 February 2014 00:37:37 Pierre Malard wrote:

> localu@nuage:~# free -h
>              total       used       free     shared    buffers     cached
> Mem:          4,0G       3,7G       279M         0B       395M       1,8G
> -/+ buffers/cache:       1,5G       2,5G
> Swap:         1,0G       7,1M       1,0G
>
> > 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?
I don't think that's true, even before chuncked uploads.
Note that this is from (quite) a while back, but what I had noticed (back
then) is that your upload location (usually /tmp) should have enough HDD space
to store the whole file.
I noticed it when running it in (VBox) virtual machine with only 512MB RAM
allocated and therefor /tmp was also rather small as Debian allocated (by
default) 20% of the size of your RAM for /tmp.
You can of course change that by modifying /etc/fstab.

> However, the "free -h" showed before were take without any
> activity. My "owncloud.log" is flat at this time...

Without any activity (and I'm the only user anyway) my 'free -h' stats are:
diederik@cknowsvr01:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          3.9G       247M       3.6G        17M        20M       110M
-/+ buffers/cache:       116M       3.8G
Swap:         4.1G         0B       4.1G

And with me logged in to the web interface:
Mem:          3.9G       409M       3.5G        25M        23M       232M
-/+ buffers/cache:       153M       3.7G
Swap:         4.1G         0B       4.1G

Note that I have very few files etc stored in my/this owncloud instance.

As you can see that is significantly lower then you have and there are a couple
of more services running on that machine (Debian testing, OC 6.0.1+dfsg-1).
So I recommend 'tearing up' your machine piece by piece to find what's causing
your memory usage. And by 'tearing up', I mean virtualized vs non-virtualized,
with NFS and without, SAN vs local disk and synching and no synching.
It would probably also be informative to have (h)top and iotop running while
performing those tests.

HTH,
  Diederik
--
GPG: 0x138E41915C7EFED6
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Jakub Moscicki
In reply to this post by MTD-3

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?

With chunked upload the memory usage from a single web server process should be indeed limited (chunk size is 10M). You may probably still get more memory used per process with web-based uploads (but these are probably rare for really big files).

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

Are you sure you use that much? What I see on my test box is ~30MB per web server process (for idle sync runs a process consuming <2% of CPU). How many web server processes do you have at any moment in time? Maybe you can check your database process memory usage also.

How active are your users? Many concurrent file uploads will generate lots of CPU load but not necessarily consume more memory for a fixed set of clients.

You should expect your NFS mount suffer because in the current implementation owncloud performs lots of redundant metadata ops.

kuba

--




Michael


On Tue, Feb 25, 2014 at 2:27 PM, Pierre Malard <[hidden email]> wrote:
Le 25 févr. 2014 à 18:07, Nicolas Zedde <[hidden email]> a écrit :
> On 02/25/2014 4:52 PM, Pierre Malard wrote :
>> We have, since 2 years, an owncloud service on our institute network. Now,
>> we want to generalize its usage but we have some interrogation about the
>> best configuration.
>>
>> The system works on virtual XEN server with Debian Wheezy. The test
>> configuration is this:
>> - 2 CPU (i7)
>> - RAM : 4096 Mo
>> - Storage area: NFS mont on a low-cast SAN SATA.
>>
>> With about 5 or 6 users, the memory is alway to 90%. So what could be this
>> charge with 150 or 300 users?
>>
>> is it because the IO access to NFS storage is too poor?
>
>
> Memory usage seems very high on your server compared to the number of users.
> Actually, I checked on an OwnCloud server on my own with roughly the same number of users and found 430MB for RAM Usage.
> Are you sure you're talking about used memory ? Debian uses cache memory to 90% of the system memory but it's not really used and can be allocated to applications.
> What does a 'top' command return in your case ? (you have to look at the ' -/+ buffer/cache' line)

That's ok, look the mem usage:
localu@nuage:~# free
             total       used       free     shared    buffers     cached
Mem:       4190044    3850664     339380          0     344996    1976800
-/+ buffers/cache:    1528868    2661176
Swap:      1048568       7260    1041308

I have increase memory allocated to this virtual machine (first test with 512 Mb) because we had a lot of strange error messages during synchronizations (not enought space left, …). As I saw the CPU usage were also full, I decide to gave 2 CPU. Now, the CPU usage is normal.

A explanation of memory usage with only 5 to 7 testings users could be that we have 2 ownCloud services: one for production usage and one for testing the new versions. The first one is on ownCloud v5.0.14a and the second on on last v6.0.1.

All ours user use this repository with all fonctionalities (data storage, calandar, …). The disk space allocated is from 500 Mb to 7 Gb per user. Every connections are done on our LDAP service.

When I'm take a look with "top", I can see that CPU usage is:
1st : apache
2nd : mysql
3rd : fail2ban

the memory usage top is:
1st : clamd
2nd : mysql
3rd : apache

If I talk about disk performance on my first mail, it's because the synchronization can be very hard and our data storage is, actualy, on a low Sata SAN. On the past, when we had only 1024 Mb of RAM, I have lots data during synchronizations following errors. I don't want ours users have the same problem.

So, my question can be:
If we have a lot of real users (about 50 concurents access to 300 users) which is the best configuration to our server?
- how many CPU dedicated?
- how many RAM?
- Sata disks or FC?

If someone have experience...

Regards

--
Pierre Malard

   « La liberté de la presse ne s'use que lorsqu'on ne s'en sert pas ! »
                                                  Slogan du "Canard enchaîné"
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

-- 
Pierre Malard

   « Si, comme le disait le général de Gaule, la France n'avait pas été la
   France... on peut logiquement penser que tous les français auraient été
   des étrangers » ;-)
                                                                               Pierre Dac
   |\      _,,,---,,_
   /,`.-'`'    -.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)

perl -e '$_=q#: 3|\ 5-,3-3,2-: 3/,`.'"'"'`'"'"' 5-.  ;-;;,-:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(-/--'"'"'  `-'"'"'\-): 22PLM::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Andre Gemuend
In reply to this post by MTD-3
Hi Pierre,

On 02/26/2014 12:37 AM, Pierre Malard wrote:
localu@nuage:~# free -h
             total       used       free     shared    buffers     cached
Mem:          4,0G       3,7G       279M         0B       395M       1,8G
-/+ buffers/cache:       1,5G       2,5G
Swap:         1,0G       7,1M       1,0G

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


it doesn't mean that all of that RAM is used for Apache. There are countless tools to measure RAM usage, but for a quick look, e.g. this script can be helpful (it just presents some values from proc): https://raw.github.com/pixelb/ps_mem/master/ps_mem.py
Run it once with apache running and once without, and compare it to the output of free (column used - cached).

Did you already disable all unused services in your distribution? Is this a minimal server install or a full-fledged installation?
Did you already disable all unused modules in apache2? Some distributions come with mod_python, etc. pp. activated, which is useless if you only host Owncloud. You should also check your mpm parameters.

What about mysql, have you checked the configuration (table buffers, join buffers, caches, etc.).
There are too many factors that influence this to give a rule of thumb imho.

Greetings
André


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Roland Hager
In reply to this post by MTD-3
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

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Matthew Caron
In reply to this post by Andre Gemuend
On 02/26/2014 02:26 AM, Andre Gemuend wrote:
> What about mysql, have you checked the configuration (table buffers,
> join buffers, caches, etc.).
> There are too many factors that influence this to give a rule of thumb imho.

As a beginning, I tuned my small install (1.5GB RAM, 2 users) using the
instructions in step 25 in my install procedure, available here:

https://github.com/mattcaron/misc_notes/blob/master/install.linode.ubuntu.12.04

--
--------------------------------------------------------------------
"To compel a man to furnish funds for the propagation of ideas he
disbelieves and abhors is sinful and tyrannical."
  - Thomas Jefferson, _A Bill For Establishing Religious Freedom_
PGP Key: http://www.mattcaron.net/pgp_key.txt
 ~~ Matt Caron ~~

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

RAM and large files [was: Which is the best server configuration for ownCloud?]

Jason Haar
In reply to this post by Michael
On 26/02/14 11:25, Michael 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?

Can someone in the know confirm if that is the case? That sounds
terrible; I can easily imagine a single user with a 4G ISO being copied
to 5 other users - 20G RAM!?! Owch!

--
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +1 408 481 8171
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: RAM and large files [was: Which is the best server configuration for ownCloud?]

Michael
A little more info, I asked about this on 1/9/13 on the mailing list.

Also here:

My resolution was over provisioning my RAM in Linux KVM. As I speculated, the chunked uploads may have fixed this.


On Wed, Feb 26, 2014 at 4:10 PM, Jason Haar <[hidden email]> wrote:
On 26/02/14 11:25, Michael 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?

Can someone in the know confirm if that is the case? That sounds
terrible; I can easily imagine a single user with a 4G ISO being copied
to 5 other users - 20G RAM!?! Owch!

--
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +1 408 481 8171
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Marcos Mezo
In reply to this post by Andre Gemuend
Hello list,

On 02/26/2014 12:37 AM, Pierre Malard wrote:
localu@nuage:~# free -h
             total       used       free     shared    buffers     cached
Mem:          4,0G       3,7G       279M         0B       395M       1,8G
-/+ buffers/cache:       1,5G       2,5G
Swap:         1,0G       7,1M       1,0G

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


it doesn't mean that all of that RAM is used for Apache. There are countless tools to measure RAM usage, but for a quick look, e.g. this script can be helpful (it just presents some values from proc): https://raw.github.com/pixelb/ps_mem/master/ps_mem.py
Run it once with apache running and once without, and compare it to the output of free (column used - cached).
As a summary for the article linked in a previous post (http://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free) and maybe some other readings I've done over time:

Linux thinks: "memory not used = memory wasted". So it will use all the memory you give at it. If you happen to increase the assigned memory to your owncloud VM, you'll probably see it fill too, even with the same software and number of users as now. If i've undestood correctly, if the kernel has nothing better to do, it uses memory as a filesystem cache and uses as much as he can (to some limit). If/when later some application needs the memory it either discards the buffered files to free some pages or maybe even swaps them off to disk.

Even seeing some swap used is per se not critical. The problem is when the system is actively/continously swapping or maybe swaping in critical moments for example when doing a backup or similar. To see if you are memory bound and thus using swap actively and therefore having performance problems, you can use the vmstat util (in debian it comes on the sysstat package).

For example in my laptop right now:

root@portatilmmg:~# free -h
             total       used       free     shared    buffers     cached
Mem:          3,6G       3,2G       408M         0B       196M       1,2G
-/+ buffers/cache:       1,8G       1,7G
Swap:         2,0G       720M       1,3G

you see I have 720Mb of swap, but I really don't care because using vmstat I can see that swap is not really beeing used:

root@portatilmmg:~# vmstat 5
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0 737268 409640 201236 1218112    1    1    59    13    5    4  6  2 91  0
 0  0 737268 410332 201264 1214852    0    0     0   310  587 1131  2  2 95  1
 0  0 737268 414712 201264 1210612    0    0     0     4  450  884  2  1 97  0

vmstat 5 prints the stats every 5 seconds. Under the header swap, si and so mean swap in and out, the bytes entering or going out of the swap. You can see that they are always 0. So swap is not beeing used at all. There is something stored there for "future" reference, but that's it.

Marcos

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Andre Gemuend
Hi Marcos,

On 02/27/2014 12:44 PM, Marcos Mezo wrote:
it doesn't mean that all of that RAM is used for Apache. There are countless tools to measure RAM usage, but for a quick look, e.g. this script can be helpful (it just presents some values from proc): https://raw.github.com/pixelb/ps_mem/master/ps_mem.py
Run it once with apache running and once without, and compare it to the output of free (column used - cached).
As a summary for the article linked in a previous post (http://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free) and maybe some other readings I've done over time:

yes, my post was meant as supplement to what you correctly wrote.

An important point is still, however you measure the _real_ usage, that not all memory that is used is used _necessarily_ for hosting Owncloud. E.g. you can save a lot of memory by optimizing your apache and php settings.

hth
André

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Chris-3
In reply to this post by MTD-3
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Which is the best server configuration for ownCloud?

Marcos Mezo
In reply to this post by Andre Gemuend
Hi,

it doesn't mean that all of that RAM is used for Apache. There are countless tools to measure RAM usage, but for a quick look, e.g. this script can be helpful (it just presents some values from proc): https://raw.github.com/pixelb/ps_mem/master/ps_mem.py
Run it once with apache running and once without, and compare it to the output of free (column used - cached).
As a summary for the article linked in a previous post (http://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free) and maybe some other readings I've done over time:

yes, my post was meant as supplement to what you correctly wrote.

Sorry, my fault. My answer was intended for Pierre, the author of the original post who seemed not to have read the linked article and was insisting on measuring the memory usage by the output of free, but I just happened to reply to the last message in the thread by the time.

Marcos
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user