Flash to SCORM in Moodle 2.4.1 (Very Slow)

Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Heng Zhang -
Number of replies: 13

We currently have moodle 1.9 as the production server and installed moodle 2.4.1+ brand new on a separate staging server. Both moodle instances have their own ip and url. We have many Flash tutorials in 1.9 (not SCORM) and we are trying to convert them to SCORM for 2.4.1. The speed is very slow. The Flash file itself takes a couple of seconds to load on both 1.9 and 2.4.1. The SCORM takes about 12 seconds to load on 1.9 but 30 seconds to load on 2.4.1. However, the SCORM loads in a couple of seconds only on a localhost 2.4.1. We urgently need help, thanks.

Average of ratings: -
In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Linda,
IMHO you've two separate issues, not related to using Flash but with the nature of serving SCORM resources (structured contents):

  1. Network connection between client and server: web server, bandwidth, proxy, ISP, ...
  2. DB connection: Moodle 2.x makes strong usage of the DB for sessions (you could try the file based sessions: Settings > Site administration > Server > Session Handling.) and for serving files (Files API)

(1) could depend on external factors while (2) should be under your control by means of a good tuning of your DB server.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Linda,
my previous post didn't mention that Moodle will greatly benefit from adding a PHP accelerator - it should be a must for any PHP app server - due to, shortly, the high number of included files in 2.x: my preference goes to XCache.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Heng Zhang -

Hi Matteo,

Thank you for your reply. We disabled the default session handling setting and will install the php accelerator tomorrow. The speed has not improved so far. The zip file is about 3mb in size. Do you think this is considered too big? Also, it works much faster on moodle 1.9 comparing to moodle 2.4 (they are on two different servers but the hardware environment seems to be similar). In your experience, do you find the same SCORM package has very different speed on moodle 1.9 and 2.4? In this case, the speed on 2.4 is at least 3 times slower than 1.9.

Thanks,

Linda

In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Linda,
using a PHP accelerator is a good practice and you'll get benefits in terms of scalability with the increasing of the concurrent users.

BTW, 3MB is a very small package so bandwidth is not the issue here: I guess there are some bootlenecks with your DB, pretty sure that using file-based sessions will improve a bit the performance but I kindly suggest to monitor the slow queries. Can you also share your overall environment? My experience is pretty based on LAMP, both single server and medium sized clusters: tuning the databases and give more RAM to the front-end(s) were always been the key to get comparable performances.

Matteo

In reply to Matteo Scaramuccia

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Heng Zhang -

Hi Matteo,

 

We use LAMP as well. This 2.4 moodle testing server has 2G Ram, 250G Hdd, Intel(R) Xeon(R) CPU E5506 @ 2.13GHz and quad core. Is there any other hardware information you would like to know? Besides the server environment, do you think it matters how the scorm package is converted? For example, if the flash is converted using another (e.g. lectora) or it is converted by adding more code, would the method of conversion affect speed?

 

Thanks,

 

Linda

 

In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Linda,
IMHO converting the package works if you'll reduce the number of files, if the issue is a bottleneck in the DB and Moodle takes time to serve each file.
Check if Theme designer mode is On, http://docs.moodle.org/22/en/Theme_settings#Theme_designer_mode: that setting slows down seriously a Moodle instance in production.

AFAIK, RAM could be an issue too in the future for the concurrency - the golden rule tells about 1GB/10 users for the front-end i.e. excluding what required by the DB - but if we're talking about just a single user connecting to launch the package, I'm pretty sure you have issues with the default configuration of your MySQL

Try first to increase the RAM for InnoDB, innodb_buffer_pool_size, generally look at any buffer parameter. Besides depending on the distro (both OS and MySQL) it could be useful to take a look at innodb_flush_method and innodb_flush_log_at_trx_commit=2 - beware about ACID! See the MySQL docs - too.

HTH,
Matteo

P.S.: @Visvanath: it is possibile for you to move this thread to the "Hardware and Performance" forum? Maybe Helen (Foster) can do it on behalf of you...

In reply to Matteo Scaramuccia

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Heng Zhang -

 

Hi Matteo,

 

 

 

It seems the slow speed is contributed by our network. I tried to install moodle 2.4.1 on other public hosting (e.g. amazon) and test the scorm module there, the speed is pretty fast (4 seconds). I also tested on demo.moodle.net, it is also within 5 seconds. In addition, I logged onto one of our internal server which is on the same sub-net as the moodle 2.4 staging server then tested there, it loads immediately.

 

 

 

However, what I don't understand is how come the scorm module loads relatively faster on moodle 1.9 testing server? It took 10 seconds to load on 1.9 but 30 seconds to load on 2.4 based on the network situation we have. Does this mean moodle 2.4 takes 3 times the resources to run comparing to 1.9? Just wondering.

 

 

 

Also, I realized our scorm module does not work on moodle 2.4.1 in an IE browser version 8 or older. Have you encountered this before?

 

 

 

Many thanks,

 

 

 

Linda

 

 

 

In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Linda,
Moodle 2.x loads more things per page into the browser which increase the load at browser side (more time to be spent WHEN the files reach the browser): in 2.x there is a nice framework which try to load things compressing and minifying the original files but they are actually many comparing the numbers&logics with what designed in a 1.9 - to tell the truth for most use cases comparing the technology under the hood of 2.4 vs 1.9 is kind of comparing apples with oranges.

The overall numbers about 1.9 vs 2.4 performances tells about 25% and not 3x (300%!): in your case, bandwidth issues make the difference... please remember: tuning is a magic art with multiple responses given the overall environment under analysis wink.

About SCORM: it's the second time I've read about potential issues of IE8 in 2.4 (at this time never tested by myself, I'm a fan of FF wink), please read about it in https://moodle.org/mod/forum/discuss.php?d=222790#p972440 . We can talk about your issues there (or in new thread in https://moodle.org/mod/forum/view.php?id=1951 ) in order to understand if there will be room/need for an improvement. While IE7 is definitely no more supported, IE8 is supposed to be supported and the theory tells that the JSON object is available from IE8.

P.S.: please give http://danmarsden.com/blog/2012/08/08/scorm-doesnt-work-in-moodle/ a read too.

HTH,
Matteo

In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

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

Welcome to "H&P". This place is not fashionable like "C&A" but there are worse places!
smile

Now to recap your situation:
- You run two servers. Let's call them production-server and staging server.

- production-server is a old server, runs Moodle 1.9. The courses are tutorials programmed in flash. But they are embedded in normal Moodle courses.

- staging-server is brand new, runs Moodle 2.4.1. You have converted the courses with flash content in the production-server to SCORM format and made backups according to http://docs.moodle.org/19/en/Course_backup. Then copied them to the staging server and restored as documented in http://docs.moodle.org/24/en/Course_restore.

And the problem is that the new courses in the staging server are slow. I quote:
> The Flash file itself takes a couple of seconds to load on both 1.9 and 2.4.1. The SCORM takes about 12 seconds to load on 1.9 but 30 seconds to load on 2.4.1. However, the SCORM loads in a couple of seconds only on a localhost 2.4.1.

> The zip file is about 3mb in size. [...] Also, it works much faster on moodle 1.9 comparing to moodle 2.4 (they are on two different servers but the hardware environment seems to be similar). In your experience, do you find the same SCORM package has very different speed on moodle 1.9 and 2.4? In this case, the speed on 2.4 is at least 3 times slower than 1.9.

Before diving into details could you confirm whether my understanding is right?

Could you also provide the information about the hardware and software of the two servers as requested in the intro: "Please include as much background information as possible about your hardware, the operating system, the web server, the database server, the PHP scripting framework, etc. If your machine is virtualized, also mention the host hardware, the operating system, the virtualization technology used and the resources assigned to the virtual machine. If you use a hosting service, mention either the hosting provider and the package or the resources as advertised."?

You have given some information about the staging-server:
> We use LAMP as well. This 2.4 moodle testing server has 2G Ram, 250G Hdd, Intel(R) Xeon(R) CPU E5506 @ 2.13GHz and quad core.

Looks like a dedicated server (real hardware) to me. Could you confirm? What are the specs of the production-server?

Just saying "LAMP" is not enough. Find the the Linux distribution and the version numbers of the system software as in the quote from the intro.

Also, have to checked whether all the performance related settings (http://docs.moodle.org/19/en/Performance and http://docs.moodle.org/24/en/Performance_settings ) of the two machines are the same or comparable?

Once we have this information in one place in some logical order, we can go into details.
In reply to Visvanath Ratnaweera

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

by Heng Zhang -

Hi Visvanath,

When I saw your reply, I'm glad my message has been moved here! Hardware and performance can be tricky. In fact, I think we spent more time last year tuning performance than moodle development. Please see my response to Matteo for our latest update. It seems like the speed problem was contributed by the network situation of the host, does that sound right to you?

Also, we are current on 1.9 but will move to 2.4.1 in summer (we are going to start 2.4.1 fresh). We have about 15000 users every semester and our question table is big. Do you have any suggestion to tune performance based on the difference between 1.9 and 2.4? I heard moodle 2.x takes more resources to run.

Many thanks,

Linda

 

In reply to Heng Zhang

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

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

Good to know that the original problem in this discussion "Flash to SCORM in Moodle 2.4.1 (Very Slow)" https://moodle.org/mod/forum/discuss.php?d=223238 is now settled. It's a relief to know that the it was not caused by Moodle but due to slow network at your hosting provider. So we can call this discussion closed.

Since you seem to anticipate related or other problems, spend some time now before things get heated up. This is the most important message:

The major difficulties with performance are: a) the "load" is a vague idea when it comes to Moodle b) even it could be measured you don't know what your N users are going to do on day X. In other words, you can't do anything rational before it strikes. Well, except one thing, you can (and should) read everything about the subject and if possible do your own experiments. All the pointers "H&W" could provide are linked to its introduction.

Additionally you could help the helpers to feel that their time is not wasted. Here are few things you could do:
- Limit a discussion to one subject. See for example Matteo's advice in the other sub-thread https://moodle.org/mod/forum/discuss.php?d=223238&parent=973086 referring to the SCORM forum.

Further reading:
- http://docs.moodle.org/24/en/Moodle.org_forums_help
- http://docs.moodle.org/24/en/Moodle.org_forums_Code_of_Conduct
- http://en.wikipedia.org/wiki/Conversation_threading
- (advanced) http://catb.org/~esr/faqs/smart-questions.html

- When helpers ask for clarifications try to comply. For example my previous post https://moodle.org/mod/forum/discuss.php?d=223238#p972407 contained a couple of questions. Well, since you could solve it otherwise the answer may not seem necessary. Sometimes it could be useful as a diary for you, or the latest, once the second round of problems arrive!

Finally, if I may ask a personal favour, could you please leave the fonts and paragraph spacing at their default values? I mean https://moodle.org/mod/forum/discuss.php?d=223238#p973051.
In reply to Visvanath Ratnaweera

Re: Flash to SCORM in Moodle 2.4.1 (Very Slow)

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

I wrote Thu, 7. März 2013, 10:29:
> All the pointers "H&W" could provide are linked to its introduction.

There is a problem. Due to some mishap those pointers have vanished from the intro and will reappear only when one starts a new discussion. (What one should read _before_ posting appear only _after_ one has started writing a new post!)

As long as that remain unsolved I can not moderate this forum. If you (or anybody else) need further information pl. contact Helen Foster, Moodle Community Manager https://moodle.org/user/profile.php?id=24152.

Good luck!