One server for 1000 concurrent user

One server for 1000 concurrent user

by Pham Kien -
Number of replies: 3

I am already have a system moodle with interval 7000 student, server of me is the IBM x3450 with 12GB ram, CPU 3.0. However, if interval 700 student the same access access does system is too load, out of memory.I am already attempt to config mysql but not good.
I am you want to use the system cho 2000 student the same access, me not as what? Make you please for me reply recommends.

Sorry because my English very bad

This is the configuration file my.cnf of me

[mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-name-resolve
skip-bdb

safe-show-database
query_cache_limit=1M
query_cache_size=512M
query_cache_type=1
max_user_connections=50
max_connections=500
interactive_timeout=10
wait_timeout=20
connect_timeout=30
thread_cache_size=100
key_buffer=512M
myisam_sort_buffer_size= 64M
#myisam_max_sort_file_size= 1M
myisam_repair_threads= 4
#myisam_recover= BACKUP
join_buffer=1M
max_connect_errors=100
max_allowed_packet=32M
table_cache=1024
record_buffer=1M
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=8M
thread_concurrency=8
server-id=1
#log = /var/log/mysql-queries.log
log_slow_queries=/var/log/mysql-slow-queries.log
max_binlog_size = 128M
binlog_cache_size=64K
long_query_time=10
collation-server=latin1_general_ci
old-passwords
innodb_buffer_pool_size=512M
tmp_table_size=256M
max_heap_table_size=256M

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=32M

[mysql]
no-auto-rehash


[isamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=2M
write_buffer=2M

[myisamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=2M
write_buffer=2M

[mysqlhotcopy]
interactive-timeout

And system status with 120 student access

Average of ratings: -
In reply to Pham Kien

Re: One server for 1000 concurrent user

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hallo Pham

You wrote:
> server of me is the IBM x3450 with 12GB ram, CPU 3.0

As the Webmin output shows, the CPU is "Intel Xeon X5450, 8 core, 3 GHz".

> However, if interval 700 student the same access access does system is too load, out of memory.

How did you measure the memory usage. The Webmin output you attached says, "11.73 GB total, 6.9 GB used". So the RAM is not full.

> I am already attempt to config mysql but not good.

How do you know, MySQL is the weakest link? Webmin shows a CPU load average close to 2.8 which means (simplified) the CPU is given 2.8 times the work which it could handle.

> I am you want to use the system cho 2000 student the same access,

700 concurrent users is already a heavy load. 2000 is not an easy task. How do you get there numbers, if I may ask? See http://docs.moodle.org/en/Performance_FAQ#How_do_you_define_.22concurrent_users.22.3F for how people here understand that figure.

> Sorry because my English very bad

No problem, the message was clear enough. It is important that you carefully go through all information given in the introduction to this forum (Hardware and Performance).

P.S. I don't know how much ressources "Flash Slideshow" consumes. It keeps the "loading" indicator of my browser alway running.

P.P.S. The peformance infomation at the bottom of your entry page shows,
0.051011 secs
RAM: 1.6Mb
RAM peak: 2.4Mb
Included 38 files
ticks: 5 user: 3 sys: 2 cuser: 0 csys: 0
Record cache hit/miss ratio : 0/0

Means you have an efficient system. What Moodle version is that?

P.P.P.S. Generally it is not a good idea to upload print-screens together with problem descriptions. Together they contain too much information which may be misused by a nasty person.
In reply to Visvanath Ratnaweera

Re: One server for 1000 concurrent user

by Pham Kien -

Dear Visvanath

Thank you because has response very fast.

I'm using Moodle 1.9 I and me know moodle using 1Gb ram for 50 concurrent user.

The system of me have 12Gb ram does must response is 500 concurrent user. However, system current only be used for interval 200 student homework test and interval 700 student view course.

I want to optimize the system to service more students most.

I tried configuring the my.cnf mysql but that is not very effective.


Next time, number of students enrolling in our will to about 20,000 and about 2,000 students will have concurrent access.


How to develop a new system for the 2000 concurrent user.

Do you have any advice for me?

Thank for all.

P.S: I want to know aboutticks: 709 user: 454 sys: 120 cuser: 0 csys: 0


In reply to Pham Kien

Re: One server for 1000 concurrent user

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Pham

> I'm using Moodle 1.9

I expected that from the performance figures in your web pages. 1.9 is much more efficient than 2.x. There will be voices saying that 1.9 is not secure, not supported, etc. For you the efficient matters, and 1.9 will get security updates for at least another year. That'll give you some time to test 2.x.

Note: If anybody is tempted to start a discussion on 1.9 vs. 2.0 please do that in the relevent forums, not here!

> I and me know moodle using 1Gb ram for 50 concurrent user.
>
> The system of me have 12Gb ram does must response is 500 concurrent user. However, system current only be used for interval 200 student homework test and interval 700 student view course.

That "50 users per GB" is a very rough formula which just not scale like "500 users per 10 GB". It all depends a) on what those users doing b) what exactly "at the same time" means. You haven't gone through the compulsory documentation given in the introduction to this forum, did you?

Even if a) and b) above are clarified, the performance will just not increase linearly with the amount of RAM, other physical limitations like CPU, network, disk I/O, will stop the progress. In fact I have the feeling that for a single machine your server is performing well.

> I want to optimize the system to service more students most.
>
> I tried configuring the my.cnf mysql but that is not very effective.
>
> Next time, number of students enrolling in our will to about 20,000 and about 2,000 students will have concurrent access.
>
> How to develop a new system for the 2000 concurrent user.

If you have reached the physical limits of a single machine just optimizing is of no use, you will have to consider clustering. There is no suggested "Moodle cluster", search the forum for other people's solutions (the link to the search facility is in the introduction).