Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by R Holden -
Number of replies: 9

I have a dedicated server, 2 pent. 4 processors, 1 GB RAM, 120 GB HD running IIS, MySQL, and PHP.

Moodle seems to move slow on this server and I was wondering if anyone might have any suggestions to speed up php on IIS (accelerator for php on windows?) or if there are some configuration changes I can try.

One word,  I need to use this server because I have another application running on IIS and using ASP pages and MS-Sql that interacts with moodle.

Any thoughts, ideas, solutions, would be appreciated!  Thanks.

Average of ratings: -
In reply to R Holden

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Andrea Bicciolo -
It is unlikely that such a system would run Moodle slowly, unless heavily loaded. How many concurrent users you have in both ASP and Moodle apps? There is any background process requesting for huge processor time and memory?
In reply to R Holden

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Michael Penney -
Hi R, are you running both systems (moodle and the ASP/MS-SQL one) on the same server?
In reply to R Holden

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Peter Powell -

I have noticed the same thing. I have a similar server running 2 similar apps running MySQL and PHP on both.

With one user only online there is a distinct difference in response times between Moodle and the other LMS. It isn't as if it is horrible it is just slow enough to be percieved as "leisurely". Haven't found any way to improve this. Although I have seen several postings suggesting PHP accelerators.

However, I think the issue must be in the way the system is coded otherwise I would expect to see similar response from the other app; but it does make me wonder about scalability issues on a loaded system.

In reply to Peter Powell

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Michael Penney -
Also check how much ram you have assigned to php (IIRC, in php.ini) and your mysql configuration (eg you should probably have it set to myHuge.config), the default severly limits MySQL's performance.

WRT to the difference between the two apps. Moodle is certainly a 'huge' php app in that it does alot of things. Your other app may not be so huge and so not see much of a slow down.

We run a 15,000 page view average Postnuke site on the same server as our 3000 pageview avg. Moodle site, they both are 'huge' types of apps and with php set to 1Gb and MySQL set to myhuge configuration, they both do fine (on a dual 2.8 running RedHat Enterprise).
In reply to Michael Penney

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by R Holden -

Hi Michael,

I tried a search for IIRC in the php.ini and it doesn't exist.  I could only up the buffer size in php.ini.  How can I set php to, say, 512 MB?

I also can not find a file called MyHuge.config on my hard drive, is it supposed to be called somewhere in my my.ini file?

In reply to R Holden

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Michael Penney -
Sorry, try myhuge.cnf or myhuge.ini. Here is a thread that might help.

These are sample files that generally come with MySQL. IIRC my.cnf holds the actual values. The basic idea is you set max connections, sort buffers, etc. as high as your system can manage without hitting swap. You can check your performance somewhat in task manager to see what is going on (there are better tools, but that is a start).

What is your php memory_limit in set to (you can check this in your moodle admin, click the php info button). Some info on that.

I have mine set to much more than 20MB for 1600 active user, performance is good so far (but this is on RHE/Apache, not Win/IISsmile.

PS, are you running Moodle by itself on that box, or is your other app (the MSSQl/ASP one) running on the same box?

In reply to Michael Penney

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by R Holden -

No problem:

I did a search, there isn't any file with 'myhuge' in the filename on my server.  I did find the my.ini in c:\windows and added the following lines:

max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 14400
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
____

Hope this was ok to do, It does seem to go a bit faster now.

I have the memory set in c:\windows\php.ini :

memory_limit = 24M

Also, to answer your question, I am running ASP and MSSQL on the same server with the MySQL and PHP setup.  any other ideas?

In reply to R Holden

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by Keith Heinrich -

My dev server is configured this way (IIS/mySql as well as SQL server) however I have selected a linux environment for production. It just runs better.

Having said that, how big is the pipe to your machine? It may be that you have traffic from other apps contributing to Moodle performance or lack of. You can tweak the network connection to provide improved throughput as well. This provided improved responsiveness to my users from the server. Google dr tcpip.

I used mmcache which required finding the right version for my release of php. I needed to run a cron job (there are any number of win cron utilities) to delete files every hour since it creates a lot of files on a heavily used system. Performance improvement was noticible but not stellar. No amount of fiddling has yielded any significant improvement from php. No such problem with Linux.

Don't allocate too much ram. Have a look at the task manager to determine how much is really used. You can use the task manager while users (you perhaps) access the server to help determine proper levels for memory usage etc. On my win server there was a huge processor spike whenever a page was served which I tracked back to IIS. Tuning IIS is another matter altogether which I won't go into here.

Tuning mysql is a fundamental installation task but don't overdo it. You may not need to allocate a lot of ram for a small database and not too many users. Do check the tables though and ensure that the database itself is in good health. Get phpmysql and take a good look. Ensure you install the missing pieces of mysql as well. The help files will tell you how to do this and phpmysql will show you what is missing.  

Good hunting.

In reply to Keith Heinrich

Re: Windows server: 1.4.3+ Install on IIS, MySQL, and PHP

by R Holden -
I've had a breakthrough!

PHP 5 and MySQL 4.1.9 work wonderfully fast together on a Windows 2003 Server with 2 processors and 1 GB ram!

I used a combination of direction sheets here, and here.