Performance FAQ

Revision as of 14:01, 2 December 2011 by sam marshall (talk | contribs) (How do you define "concurrent users"?)

Jump to: navigation, search

How do you define "concurrent users"?

As has been repeatedly stressed in the Hardware and performance forum, the load on the server at a particular time depends on the number of concurrent users, not on the total number of users neither on the number of users logged-in. The term "concurrent users" is used to mean those users for whom the server is actively doing something. It may by processing a webpage written in PHP, querying the database or simply transferring a file. (see also Wikipedia Concurrency)

Why is "concurrent users" not a useful metric?

When considering a new site or new hardware, this metric is not very useful because you have no idea how many 'concurrent users' (a better term might be 'concurrent requests') you will have.

For example, if you have 10,000 registered users and you estimate that, during times of peak load, about 1,000 of those users will be using the system, there is no easy way to obtain the number of 'concurrent users'.

  • It depends on what the users are doing (if they are contributing to a forum they will make fairly frequent requests but with long pauses to write posts; if they are downloading a PDF they will only make a single request but it will take a long time; if they are doing a quiz they will make very frequent requests).
  • It also depends on system performance. If your system can serve a typical page in 0.1 seconds then if you have 10 people making a request within a second this is an average of 1 concurrent user. If your system takes 1 second to serve a page then the same usage pattern results in an average of 10 concurrent users.

In addition, the number of concurrent users is not a very accurate measure of demand because a "concurrent user" may be downloading a large file, which takes time to transfer based on the speed of their network connection. While this does place a demand on the server, the demand of sitting there for 30 seconds transferring a large PDF file to somebody with a slow network connection is much less than the demand of handling, say, 30 one-second PHP requests over the same timeframe.

How do I benchmark a Moodle-site?

You can of course benchmark parts of the system separately: the hardware as seen by the operating system (eg. CPU, disk access), web server performance, database server performance, execution on PHP operations, etc. For further details see Performance#Obtain_a_baseline_benchmark.

But there is no easy formula to deduce the maximum number of concurrent users from those results. There is a PHP-script, the Performance perspectives - a little script, circulating amoung the Moodle-community which calculates a ballpark figure. The current version is attached to posting on 25. March 2011.

Warning: Note that running this script on a production server may have unwanted side-effects. You are strongly adviced to run it on a test-site.

What are PHP-accelerators?

See Wikipedia PHP accelerator.

Available software are documented under Performance#PHP_performance.

You find some user suggestions here Update on PHP-accelerators.

How do I cluster Moodle?

See Performance#Scalability


How do I replicate Moodle?


How to Replicate MOODLE ??!!

My site is very slow, what should I do?

First find out "how slow". (The theme-trick here).

The next question is, whether the performance is normal or something malfunctions. There are many things which can malfunction:

  • hardware
  • crashed filesystems, specially network filesystems
  • memory leaks or other crashes in the system
  • bug in Moodle
  • corrupted database
  • networking issues (DNS, firewalls, ...)

Or your performance could be "normal" under the given circumstances:

  • Are you on a dedicated server or a shared (virtual) server?
  • How much RAM, processing power do you have?
  • What is the software stack you use? (Unix or Windows, Apache or IIS, MySQL, PostgreSQL or SQL-Server, ...?)
  • how many concurrent users can you support
  • what modules/activities you use? Check Performance#Performance of different Moodle modules

Performance#Obtain a baseline benchmark and compare it with the published figures.

What are the requirements for N users?

A moodle setup for 10K simultaneous users

How many users will my installation support?

This is another way of asking the same question as above. Please move up.

What is the best webserver?

Should I go for 64 bit or is 32 bit OK?

What hosting provider do you recommend?

See also

Using Moodle forum discussions