Hardware and performance

 
 
Gmads
M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi all,

I'm working on a laptop in which I just did a clean Wamp installation. Here's my setup:

  • Windows 7 Home Basic 64bit
  • Intel Core i3-2350M 2.30GHz
  • RAM 4.00 GB
  • Apache 2.4.6 (httpd-2.4.6-win32, from Apache Lounge)
  • Php 5.4.17 (php-5.4.17-Win32-VC9-x86, from php.net)
  • MySQL Server 5.6 (mysql-5.6.13.0-installer-community)

After I installed Moodle 2.5.1, I had to deal with php_zip.dll (it is not included anymore in late PHP versions, but the usual line is still in the config files) and with php_intl.dll.

Both issues solved, however... this is my first local installation ever (and I've done quite a few) to run so slowly! After clicking the login button, almost a 30 second wait to get the main page displayed with a static mouse pointer.

I'm still unfamiliar with the performance report, but here it's the one I got after log in:

23.104322 secs

RAM: 26.1MB
RAM peak: 26.2MB

Included 662 files

Contexts for which filters were loaded: 1
Filters created: 4
Pieces of content filtered: 1
Strings filtered: 0
get_string calls: 1337
Included YUI modules: 0
Other JavaScript modules: 2

DB reads/writes: 44/2
Session: 4.1KB

Caches used (hits/misses/sets)

core/databasemeta
** static persist **: 11 / 16 / 0
cachestore_file: 16 / 0 / 0

core/string /*
** static persist **: 2541 / 529 / 0
cachestore_file: 528 / 1 / 0

core/pluginlist
** static persist **: 3 / 103 / 0
cachestore_file: 62 / 41 / 41

core/plugintypes
** static persist **: 952 / 1 / 0
cachestore_file: 0 / 1 / 3

core/yuimodules
cachestore_file: 1 / 0 / 0

core/repositories
** static persist **: 0 / 8 / 0
cachestore_static: 0 / 8 / 16

core/plugininfo_base
** static persist **: 4 / 880 / 0
cachestore_file: 878 / 2 / 316

core/plugininfo_mod
** static persist **: 72 / 1 / 0
cachestore_file: 0 / 1 / 1

core/plugininfo_block
** static persist **: 46 / 1 / 0
cachestore_file: 0 / 1 / 1

core/plugininfo_filter
** static persist **: 5 / 1 / 0
cachestore_file: 0 / 1 / 1

core/plugininfo_repository
** static persist **: 19 / 1 / 0
cachestore_file: 0 / 1 / 1

core/coursecat
cachestore_session: 0 / 1 / 4
**static session**: 1 / 2 / 3

core/coursecontacts
** static persist **: 0 / 2 / 0

Total: 5139 / 1603 / 387

This page is: General type: frontpage.
Context Front page (context id 2).
Page type site-index.

Could someone help me decipher that smile and hopefully give me some pointers about how to improve performance? I'm not looking for lightning fast; acceptable would be fine.

Once logged in, each and every click takes 10+ seconds to have a rendered and stable page.

Thanks!

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: M 2.5.1, running very, very slow
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Have you changed any configuration settings yet? One way to make your site very slow is to turn on both "Theme designer mode" and the experimental "Optimise CSS" setting.

Another possibility is that caching is slow, but that should not be the case on your own computer. Anyway, go to admin -> plugins -> caching, and use the test feature there to see how fast the file cache is. You will see from the data you gave that there are more than 1000 reads from the file cache store on the page.

Finally, if you want to get very technical, see http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html for how you can really find out why Moodle is being slow.

 
Average of ratings:Useful (3)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Tim,

Since the first minute after having Moodle installed I had that waiting time. I did my usual setup routine: basic things, language packs, localization and such; regarding themes, I only selected the Clean theme.

Ok, I'll do that, the Test feature. I assume that the file cache is part of Moodle, right? And so, if there are that many reads, then there must be some way to configure it?

Thanks for the link, I'll give it a read.

 
Average of ratings: -
Picture of Ryan Smith
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers

First, the ZIP extension in PHP on Windows is now built into core so you don't need to do anything for it to be enabled. Just leave the line as ;extension=php_zip.dll in the php.ini file.

It appears you are running PHP as an Apache module. PHP running as an Apache module with Moodle is very unstable on Windows (random pages will cause it to internally crash with various errors). The better alternative is running PHP via mod_fcgid. You can find installation instructions on Apache Lounge: http://www.apachelounge.com/viewtopic.php?t=5489

By using mod_fcgid, you can switch to the 64-bit version of Apache (from Apache Lounge) and you will need to switch to the NTS version of PHP ( http://windows.php.net/downloads/releases/php-5.4.17-nts-Win32-VC9-x86.zip).

Running an opcode cache accelerator is a must. Zend Opcache is currently supported by PHP:

http://windows.php.net/downloads/pecl/releases/opcache/7.0.2/

Also, keep in mind that MySQL 5.6 is actually slower than MySQL 5.5 due to the Performance Schema being enabled by default.

 

 
Average of ratings:Useful (2)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Ryan,

Yes, I just discovered that; that line should have been taken out of the config file, now that it is not needed anymore.

Yes, I have always had PHP run as an Apache module. I usually just configure basic things and that's it. I'll definitely look into the mod_fcgid option, something new to learn and try out smile

I didn't know that. Could version 5.6 be as fast as version 5.5 by disabling the Performance Schema?

Thanks very much for all the tips and references!

 
Average of ratings: -
Picture of Ryan Smith
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers

We ran PHP as the Apache module for years, but starting with Moodle 2.0 and above we experience major issues with performance and crashing so we switched to mod_fcgid and it has been very stable.

Actually, MySQL 5.6 with the performance schema disabled is STILL a little slower than 5.5. Check out:

http://www.mysqlperformanceblog.com/2013/02/18/is-mysql-5-6-slower-than-mysql-5-5/

Personally, I recommend switching to MariaDB at this point. But that is a whole different discussion! smile

 
Average of ratings:Useful (1)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi all,

I decided to start with the MySQL database server: uninstalled the 5.6.13 version and installed 5.5.33. I also reinstalled Moodle 2.5.1, but this time I didn't do any basic configurations.

As I imagined, because this in not a db test, log in time didn't change much, it decreased 0.4 seconds. Again, each click once logged in takes around 13 s to settle.

Basically, all cache numbers remained the same, except for the "core/string, static persist" hits: they went from 2541 to 1773.

The "core/coursecontacts" section wasn't displayed, I imagine because I haven't created any course. Is there a documentation page with a description of the performance report?

I'll continue to work with the advice given and report about any changes, or lack thereof.

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

By the way, I just ran the performance test (plugins > caching), and this is what I got (not that I know how to interpret it): 

Store requests when used as an application cache.
Plugin             Set     Get - Hit  Get - Miss  Delete
File cache         3.3342  1.0701     0.009       0.038

Store requests when used as a session cache.
Plugin             Set     Get - Hit  Get - Miss  Delete
File cache         2.3101  0.843      0.007       0.034
Session cache      0.001   0          0           0.001

Store requests when used as a request cache.
Plugin             Set     Get - Hit  Get - Miss  Delete
Static req. cache  0       0.001      0           0

 

 
Average of ratings: -
Picture of J S
Re: M 2.5.1, running very, very slow
 

Install memcached on a system and use it for your caching mechanism. Its very easy to setup and you will see big performance gains.  Your "Sets" are taking a long time indicating a slow filesystem.

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Last comparative report before doing server configuration changes.

Apache 2.2.25 (Win32 VC9)
PHP    5.3.27 (Win32 VC9)
MySQL  5.5.33 (Win32)

                1.9.19  2.0.10  2.2.10  2.5.1
                ------- ------- ------- -------
log in            7       14      14      28
browse users      5       7       7       10
return home       4       7       9       23
log out           4       7       7       6

Everything, from the server environment to each Moodle version, were clean installations. Before doing this small test I turned off debugging and performance info from M 2.5.1. Times were since doing click on a link or a button, till the page displayed and the mouse pointer stopped. I don't have nor use tools to make more precise or detailed reports; anyway, this gives a general perspective (I hope).

 
Average of ratings: -
Walking on the snow towards Lago Nero...
Re: M 2.5.1, running very, very slow
Group DevelopersGroup Particularly helpful Moodlers

Hi Guillermo,
my experience with MySQL in Windows (for dev purposes) tells me that InnoDB is the culprit: it seems that Windows OS and MySQL are challenging when writing to the disk. My settings (for dev purposes) are:

C:\MySQL\MySQL Server 5.6\my.ini
...
innodb_flush_log_at_trx_commit=2
innodb_buffer_pool_size=256M
...

HTH,
Matteo

 
Average of ratings:Useful (1)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Matteo,

While I could agree or not, the issue is that all versions were running with the same database setup and this was not a particularly database intensive test smile

 
Average of ratings: -
Walking on the snow towards Lago Nero...
Re: M 2.5.1, running very, very slow
Group DevelopersGroup Particularly helpful Moodlers

Hi Guillermo,
InnoDB adoption has been "forced" starting from 2.0.x, having Moodle introduced a warning for the administrators about that: Database tables are using MyISAM database engine, it is recommended to use ACID compliant engine with full transaction support such as InnoDB.

You should look at your databases for the engines adopted by the tables (I guess at least 1.9 to be running on MyISAM): it could be reasonable that up to 2.2 you've selected MyISAM (as I did for my dev envs).

Another culprit is the Moodle session management which was by default file-based and then moved to be DB-based and that's another great performance hit when using InnoDB (on Windows): check it out in Settings > Site administration > Server > Session Handling > Use database for session information. More techy details about the reasons to adopt DB-based sessions in Moodle can be found in https://moodle.org/mod/forum/discuss.php?d=212940.

HTH,
Matteo

 
Average of ratings:Useful (1)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Matteo,

Yes, good point. I can recall when I had to read a bit about InnoDB because up to that moment I had only been using MyISAM. Since some point after I set the my.ini MySQL configuration file to use InnoDB by default:

default-storage-engine=INNODB

As I always create the database & user before running the Moodle installation process, all my installations use InnoDB. I have already deleted the 1.9 one, so I'm not sure if it used the MySQL default or if the install script forced MyISAM*. Anyway, I recently installed a 2.4 version and now I can see that from version 2.0 to 2.4, times are basically the same --again, this was just a very very simple test.

Given that I didn't change anything at any of them, all (except 1.9, I guess, since that version must have used the disk) were running with the default session handling: Use database for session information.

Point is, all installations were running with their default settings and all under the same environment and conditions; that's why I considered significant the result.

 

I suppose that most Moodle installations can be classified as "large/busy sites or sites built on cluster of servers", or else, why is this directive enabled by default when the description message says, "For most sites this should probably be left disabled so that the server disk is used instead"... hm... a bit contradictory thoughtful

--- edit

I just checked and I still hadn't deleted the Moodle 1.9 database. It was set to use the InnoDB storage engine.

 
Average of ratings: -
Walking on the snow towards Lago Nero...
Re: M 2.5.1, running very, very slow
Group DevelopersGroup Particularly helpful Moodlers

Hi Guillermo,
you're definitively right: Moodle is increasing the requirements minor per minor. What makes the difference with such increase is the usage of an opcode accelerator (e.g. OPcache, XCache, APC) to minimize the resources (time & server) required to access and elaborate all the files read on each request; resources are spent also for that and not just for the real final computation required for that request.

BTW, what I'm trying to say here is that MySQL/InnoDB and Windows are not good friends in managing the transaction towards the hard disk, at least in my dev experience. If you want to spend some extra time, you could create a MySQL server on a Linux machine - you can start with a virtual machine hosted in your physical machine -, restore the same databases on the new MySQL server, point your Moodle installations on that new DB server and compile the same comparison chart.

About the session management: it's a long story written in the code, in several commits and some notes in the Tracker. Shortly DB is the right choice with IMHO a big drawback: you should own the DB (here, MySQL) server to have the required power and to tune it carefully according with the needs of Moodle (here, e.g.: max_allowed_packet). That being said, most of the core developers will never configure Moodle to use file-based sessions wink: you can try to ask for it in a separate thread.

HTH,
Matteo

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Matteo,

Well, it sure was quite an increase in resource usage, and that's OK because that's the price for having a better and friendlier Moodle, at least in some areas because there are others where things went really bad tongueout. For me, and given the kind of user I am, the issue was solved by learning some new things and putting them in practice, which is always good, but even if the problem had continued after using all the tricks of the trade, it could finally be fixed by adding more memory or getting a better CPU. So, it is better to have issues that can be solved than not having those issues because the software isn't evolving.

Yes, I have that Linux test as homework, but as I wanted to have it installed as my third OS I still need to do some reading and start with the whole process. Right now I'm starting with a new project and so I don't have as much free time, but I'll sure do it.

I actually do not change the session management setting in my installations nor in those of my clients, it is just that the final recommendation given in the description contradicts the chosen default setting.

Thanks! Yes

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

So I finally installed the latest Apache & PHP versions:

Apache 2.4.6 VC11 x64.
PHP 5.5.1 VC11 x32.

I have Apache running as FastCGI. For the time being I set MySQL back to version 5.5.33.

While I imagined that performance wasn't going to change that much (as I had done a test under Apache 2.4.6 VC10 x32 and PHP 5.4.17 VC9 x32, with the same null results), I did hope it would improve; it didn't change at all, well, not really: "log in" and "return home" times actually increased two seconds sad

It really amazes me that an out-of-the-box installation, without users, configuration changes, courses or anything else, has such a low performance. Well, it seems it's time to see about the opcode cache accelerator... and this is just a local installation to do tests and to get familiar with new features thoughtful

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Well, as Ryan rightly said, Running an opcode cache accelerator is a must!

As I was working with PHP 5.5.1, the OPcache extension is already included and so I only had to add the zend_extension directive and make it point to the php_opcache.dll file:

zend_extension=C:\my\path\to\php_opcache.dll

and then enable some of the OPcache directives:

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=64
opcache.interned_strings_buffer=4
opcache.max_accelerated_files=2000
opcache.revalidate_freq=2
opcache.fast_shutdown=1
opcache.enable_file_override=1

This was my first test and so I kept the original values as set in php.ini.

I first repeated two times the log in, etc. sequence, and then I timed each step. Here are the results: 

                 1.9.19    2.2.10    2.5.1
                -------   -------   -------
log in             4         6        18
browse users       3         3         6
return home        2         3         5
log out            3         4         4

Tot. time w/opc.   12        16        33
Tot. time wo/opc.  20        37        67

% reduction        40%       57%       51%

As shown, not only total times decreased in half, but Moodle 2.5.1 with OPcache was almost as fast as Moodle 1.9.19 without OPcache (except for the log in time).

I know this was an extremely simple and unsophisticated test, but I hope it will help to demonstrate the need, now more than ever, to have a caching and optimization system installed, even if one is only going to work on a local setup.

Thanks to all for the advice given smile

p.s. Info about the performance reports would still be appreciated.

 
Average of ratings:Useful (1)
Picture of Visvanath Ratnaweera
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers
Hi Guillermo

You wrote:
> It really amazes me that an out-of-the-box installation, without users, configuration changes, courses or anything else, has such a low performance. Well, it seems it's time to see about the opcode cache accelerator... and this is just a local installation to do tests and to get familiar with new features ...

This is intriguing. The way I understand it, the jump from 2.4 to 2.5, everything else remaining unchanged, degrades the performance drastically. The comparison is not straight forward though due to the various caching mechanisms involved.

But how much is that in practical terms? A Core i3 laptop with 4 GB is not a server but still it should be sufficient for a single user! My laptop, Core i5 M540, over three years old, simply flies. Well, I've upgraded the RAM to 8 GB (utilized only when I run many VMs in parallel), and replaced the HD with a SSD and of course it runs Debian Linux. Must add that I haven't tested Moodle 2.5 yet.

I could repeat your exercise on my laptop but the different hardware will make the comparison unusable. Would you mind installing Linux, native as dual-boot, on your laptop? If you stick to my documentation http://www.syndrega.ch/?p=14, etc. you'll have a direct comparison.
 
Average of ratings:Useful (1)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Visvanath,

I only installed and compared versions 1.9, 2.0, 2.2 and 2.5. I don't know but I'd say that change hasn't been linear. Times increased from 1.9 to 2.0 and then remained stable (in general terms) until 2.2, at least as far as I know, as I didn't test 2.3 nor 2.4. However, based on your comment, it does seem that 2.5 was the next big change.

When I first installed 2.5.1 a few days ago, it really surprised me the slowness at which it performed and that's why I decided to do an objective comparison with all versions running under the same environment. In my last test I discarded version 2.0 because numbers were almost identical to 2.2.

I do agree with you, an i3 2.3 GHz with 4 GB should be more than sufficient, but it seems it actually isn't. I don't agree, however, than a similar test in your own environment would throw an unusable comparison, because you would get proportional numbers between versions and between them running with and without OPcache, or anything similar.

Curiously enough however, a few weeks ago I made this laptop dual-boot with Windows XP Pro 64, but eventhough I really love XP I finally decided to delete it because I was only able to get a few drivers and then I ended with a very limited laptop. A couple of days ago I downloaded an Ubuntu 13.04 ISO file, so your suggestion comes at a very good moment; I'll read your documentation and let you know about the tests. Given that I'll start from zero, what would you recommend, Debian or Ubuntu?

Disclaimer: While I worked 20 years ago with Xenix, this will be my first try at Linux and so I guess it will take me some time to report anything useful tongueout

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers
Hi Guillermo

Repeating the series on my machine is indeed not a bad idea. Only thing, now the fall semester starting I can't promise when.

If you have worked on any command line system, whether DOS, CP/M, VMS or a Unixode, that'll will greatly simplify the take off in Linux. Important thing for now is that Unix differentiate between client and server systems. Otherwise practically no difference between Debian and Ubuntu as long as you do the "standard" installation in Debian or take the Ubuntu Server Edition and be careful not to install a GUI. I've mentioned that at the beginning in http://www.syndrega.ch/?p=14.
 
Average of ratings: -
Picture of J S
Re: M 2.5.1, running very, very slow
 

OPcache should be built into php by default as of php5.5 unless you disabled it.  

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi J S,

Yes indeed, OPcache is built into PHP 5.5+, but it is not enabled by default smile

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi,

I was requested to describe the steps I followed to solve this issue.

I must make clear that the following steps were to: 1) update my web server environment to the latest versions; 2) have PHP installed over mod_fcgid instead of having it as an Apache module (this allows to have Apache 64 bit and PHP 32 bit without issues); and 3) to enable a cache optimizer and accelerator (Zend OPcache, in my case).

1. Went to http://www.microsoft.com/en-us/download/details.aspx?id=30679, downloaded Visual C++ Redistributable for Visual Studio 2012 (vcredist_x64.exe, Update 3, at that time) and installed it.

2. Went to http://www.apachelounge.com/download/, downloaded the latest Win64 VC11 Apache 2.4 (httpd-2.4.6-win64-VC11.zip, at that time) and installed it.

3. Went to http://windows.php.net/download/, downloaded the latest Win32 VC11 Thread Safe PHP 5.5 (php-5.5.1-Win32-VC11-x86.zip, at that time) and installed it. Note: the Non Thread Safe version also works, but it has been said that it is not as stable as the Thread Safe version.

4. Opened the Apache httpd.conf configuration file (at the conf directory), did the usual configurations and, after the LoadModule section, added the following lines (update the paths as needed):

LoadModule fcgid_module modules/mod_fcgid.so
<IfModule fcgid_module>
   FcgidIOTimeout 40
   FcgidConnectTimeout 10

   FcgidMaxProcesses 300
   FcgidMaxProcessesPerClass 300

   FcgidOutputBufferSize 64
   ProcessLifeTime 0
   FcgidMaxRequestsPerProcess 0
   FcgidMinProcessesPerClass 0
   FcgidFixPathinfo 1
   FcgidProcessLifeTime 0
   FcgidZombieScanInterval 20
   FcgidMaxRequestLen 536870912
   FcgidIOTimeout 120
   FcgidTimeScore 3

   FcgidPassHeader Authorization

   FcgidInitialEnv PHPRC "C:\\My\\Path\\To\\Php5.5.1"
   FcgidInitialEnv PATH "C:\\My\\Path\\To\\Php5.5.1;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
   FcgidInitialEnv SystemRoot "C:\\Windows"
   FcgidInitialEnv SystemDrive "C:"
   FcgidInitialEnv TEMP "E:\\TEMP"
   FcgidInitialEnv TMP "E:\\TEMP"
   FcgidInitialEnv windir "C:\\WINDOWS"
   <Files ~ "\.php$">
      Options Indexes FollowSymLinks ExecCGI
      AddHandler fcgid-script .php
      FcgidWrapper "C:/My/Path/To/Php5.5.1/php-cgi.exe" .php
   </Files>
</IfModule>

5. Copied the php.ini-development file as php.ini, did the usual configurations and enabled and/or set the following directives (update the paths as needed):

extension_dir = "C:\My\Path\To\php5.5.1\ext\"

[opcache]
zend_extension=C:\My\Path\To\php5.5.1\ext\php_opcache.dll    ;this line was added

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=64
opcache.interned_strings_buffer=4
opcache.max_accelerated_files=2000
opcache.revalidate_freq=2
opcache.fast_shutdown=1
opcache.enable_file_override=1

 

If the Apache web server and the PHP scripting language do not need or cannot be updated, and the PHP version installed does not have the OPcache component, then the package will have to be downloaded and installed manually (see link at "References").

 

--- References
http://www.apachelounge.com/viewtopic.php?t=2394
http://www.apachelounge.com/viewtopic.php?t=5489

http://pecl.php.net/package/ZendOpcache
http://windows.php.net/downloads/pecl/releases/opcache/pecl/releases/opcache/
http://www.php.net/manual/en/opcache.configuration.php

http://support.microsoft.com/kb/2019667 (all the latest supported Visual C++ downloads)

 
Average of ratings:Useful (1)
Picture of Ryan Smith
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers

Guillermo,

I'm glad to hear you got things running faster. I'm glad you found the Apache Lounge forum links for help. I am the user "Smitty" on there (so this all comes full circle!)

A couple of notes/questions. Where did you read that the thread safe version of PHP is more stable than the non-thread safe? I've always used the NTS version. I'm not opposed to switching, I just wondered where you read that.

Also, the opcache developers have some recommended settings for the configuration of the accelerator. I've been using these settings for about 4 months and everything works great:

opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

Here is the link to those settings:

https://github.com/zendtech/ZendOptimizerPlus/

Most important is opcache.memory_consumption. Right now, our very busy Moodle site's opcache is using 60.7 MB of memory, so a 64 MB limit is a little low for Moodle in my opinion.

Also, here is a link to a script that lets you monitor your opcache usage:

https://gist.github.com/ck-on/4959032

 
Average of ratings: -
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Ryan,

It's good to know you're also there, while now I'm more familiar and fluent doing all this Apache, PHP installations, some time ago I did struggle quite a bit when I first tried to start using the Apache Lounge versions. Anyway, your advice here was really useful because that solved my problem and I also learned to configure my local web environment in a different and better way.

I found the recommendation to use the thread version here, in the third paragraph of the "PHP Setup" section:

http://www.apachelounge.com/viewtopic.php?t=2394

Thanks for the additional links. I'll take a look at them.

 
Average of ratings: -
Picture of Deyvid W Angioletti Evaristo
Re: M 2.5.1, running very, very slow
 

Hi guys,

First of all, thanks @Guillermo for the detailed explanation.

I also would like to share my tips for improving Moodle performance.

If you 're using Windows 2008 + IIS + PHP and want to deploy an efficient cache solution, I suggest using the [WinCache Extension for PHP] that comes in the Microsoft Web Platform Installer (Web PI) package. Fast, useful and you don't need to type a single line of code - it automatically installs and includes the extension in your php.ini.

After that, you just need to install the [WinCache plugin for Moodle] and replace the default File Cache store by the Shared Memory Cache to take maximum advantage of the extension.
You can find the plugin here: https://moodle.org/plugins/view.php?plugin=cachestore_wincache (Don't forget to read the README.txt inside)

Actually, if you don't have any experience with PHP on Windows, I would recommend you to use the Web PI to install PHP on your fresh installation. Despite the fact that the current version installs PHP 5.3 (until this moment), it is completely compatible with Moodle 2.5.1 and indeed helps you to save time.

WinCache/Web PI = http://www.iis.net/downloads/microsoft/wincache-extension
PHP53/WebPI = http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53

Cheers,

Deyvid William Angioletti Evaristo

 
Average of ratings: -
Picture of Ryan Smith
Re: M 2.5.1, running very, very slow
Group Particularly helpful Moodlers

Deyvid,


I would not recommend Wincache to any IIS users at this point because Microsoft is phasing out its opcache capabilities due to Zend Opcache being included with PHP 5.5. See:

http://forums.iis.net/p/1201106/2056593.aspx/1?WinCache+1+3+5+release+on+SourceForge

Particularly:

  • Since the Zend Opcache extension is now in the core PHP product, the WinCache opcode cache is disabled by default.  The opcode cache portion of WinCache is now deprecated, and will be removed in a future release of the WinCache extension.
 
Average of ratings:Useful (1)
Gmads
Re: M 2.5.1, running very, very slow
Group Particularly helpful MoodlersGroup Testers

Hi Deyvid,

You're welcome. For teachers or for people that only are going to create course, it would be OK to use integrated, automatic solutions because that takes a lot of burden out of the way. For those that have to work with servers and manage installations, etc. it is better to use and install each component individually because that gives a greater amount of control.

The Microsoft Web PI is best for people who like or are used to IIS. For those that prefer Apache there are packages like Wamp Server, XAMPP, EasyPHP & Bitnami.

 
Average of ratings: -