Moodle very slow on local Windows high end laptop

Moodle very slow on local Windows high end laptop

by Michel DENIS -
Number of replies: 8

Hi 

I'm used to Moodle on Linux, for several years, distant servers on shared wab hosters, but I'm installing it now, in local, on a high end laptop on Win 8, 6 GB ram. Using Bitnami's kit ie Apache and MySQL

Everytime a key punch requires a (Moodle) action from the web server it takes about 5-6 seconds to proceed, while on a distant web server it takes 2-3 seconds.

Please could you tell me which params I should change on local Apache or something else?

Thanks,

-michel

Average of ratings: -
In reply to Michel DENIS

Re: Moodle very slow on local Windows high end laptop

by ben reynolds -

Hi,

I'm running the regular WAMP installation on a Dell Latitude E6510 with 8 Gb RAM, and your speed is about the same as mine. It's the nature of Windows to be noticeably slower, even when it's localhost. Sorry to say there's not much you can do about it.

Perhaps I'm wrong? I'd love to speed up my localhost. Anybody?

In reply to ben reynolds

Re: Moodle very slow on local Windows high end laptop

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> It's the nature of Windows to be noticeably slower, even when it's localhost.

What kind of nature is that? Definitely not engineering! Ha, ha, ha!
In reply to Michel DENIS

Re: Moodle very slow on local Windows high end laptop

by Usman Asar -
Picture of Plugin developers Picture of Testers

Michel,

First thing you cannot compare a web server class hardware to a desktop class computer, despite the limited allocation of resources on shared hosting environment (25% of 1 CPU and 1GB RAM) the discs are enterprise class and in RAID Array, and its disc activity that pulls the performance out of any 3-tier web application.

Now coming to your desktop, where your CPU and RAM are more than sufficient, chances are you'll be stuck with 5400 RPM SATA Drive, which though still shouldn't be an issue for the Moodle to load pages in ~5 seconds, have you enabled Zend opcache in PHP? As I have seen much more improvement using that, apart, I couldn't understand the need of Apache if you are on Windows already (now assuming you are on Windows 8 Standard as opposed to Windows 8 PRO that comes with IIS Express).

try enabling opcache and see if performance improves, as I have tested on WIndows Server 2012 R2, with IIS, MySQL and have tested RAW, with WinCache (IIS's PHP accelerator) and with enabling zend opcache as well, though WinCache does improves over performance but opcache's performance was really worth a praise, with page loading times of less than a second and I hadn't even allocated full of my resources to server o/s, but was running on a VM with 1 core CPU and 1GB RAM allocated.

Just to mention, opcache comes as part of package since PHP 5.5, so make sure you have PHP 5.5 to make use of it, if you aren't using it already.

In reply to Usman Asar

Re: Moodle very slow on local Windows high end laptop

by Michel DENIS -

Thanks you Usman.

My Moodle comes from Bitnami which still has php 5.4. I imagine there are some risks if I install php 5.5 in that environment (next week I have several customer demos to deliver...)

So I looked to get a compiled Opcache package to instal, but can only find one in sources format. Do you know where I can find one in compiled format ?

Thanks again,

-michel

In reply to Michel DENIS

Re: Moodle very slow on local Windows high end laptop

by Usman Asar -
Picture of Plugin developers Picture of Testers

Michel, for Windows based installations, its DLL files added to extension directory in PHP, I have seen no issue with PHP 5.5 or even 5.6, in fact there was a small issue (segfault running with moodle) with opcache, and the team behind opcache fixed that for moodle and that is to be included in next coming version of PHP 5.5 and 5.6 with opcache version 7.0.5. 


On the link below, you'll find PHP 5.3 and 5.4 with opcache DLL's, all you have to do is download the files and add .dll file to your ext directory. in addition tot that, you'll be adding these lines of code in your PHP.INI file, save it and restart your Apache.

[ExtensionList]

zend_extension=php_opcache.dll

[opcache]
opcache.enable=1
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

You can change the above values as per your requirement (like increasing memory consumption etc), but these values I have written are default recommended when firing up zend opcache, so even keeping these values will bring substantial improvement.

for opcache version 7.0.3, you can go to this link

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

for opcache version 7.0.4

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

for opcache version 7.0.5 (being latest with Moodle bug fixed)

http://windows.php.net/downloads/pecl/releases/opcache/7.0.5/ (only available for 5.3 and 5.4)

Be assured you are downloading NTS (Non-Thread Safe) version, limitation is for 5.3 and 5.4 versions there isnt x64 available.

Just to be assured PHP is now working and enabled in your PHP, open your PHP INFO file in your browser, and you'll see Zend Opcache's logo and settings showing up.

if you'd been using the WIMP combo (I as in IIS) then I could have assisted you more, but on Linux and Apache, my hands are bound, I am pure windows person.

Average of ratings: Useful (1)
In reply to Usman Asar

Re: Moodle very slow on local Windows high end laptop

by Michel DENIS -

Thank you Usman - will do that.

Have a nice Sunday,

-michel

In reply to Michel DENIS

Re: Moodle very slow on local Windows high end laptop

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You're running a huge server-based application on a desktop operating system and laptop hardware. The machine allocates its resources for running the desktop (and applications) not your server apps. You might do better with Linux on your laptop but that sounds ok for Windows.

Average of ratings: Useful (1)