64 bit Moodle

64 bit Moodle

by Rob Duncan -
Number of replies: 9

Hi,

we are currently building a new Moodle architecture and I have some questions about 64 bit Moodle, If we where to go with it , it would be Red Hat Linux version 5-, Is anybody here using this in there deployment? come up against any problems?, can you still migrate courses from a 32 bit version? what kind of performace gains 10-20%??

Thank you

Rob

Average of ratings: -
In reply to Rob Duncan

Re: 64 bit Moodle

by Gary Benner -

Rob,

Moodle itself is written in the PHP scripting language with database and webserver support. There is no 64 bit "Moodle" that I'm aware of. The PHP compiler/module, the DB and underlying OS can be 64 bit, but the Moodle code itself is not 64 bit. The Moodle code itself is actually plain ASCII text, and is the same for any CPU / Bus bit count.

So to answer your questions as best I can:

1. My preference is Linux - I use RHEL / Centos. Note that as mentioned elsewhere, when you go 64 bit, everything needs to be 64 bit, but that is how it comes with RHEL / Centos ISO.

2. Course migration from one Moodle instance to another, even on the same machine involves the backp - restore function within Moodle. As long as the Moodle version is the same, and the identical third party external modules and blocks are installed, then there should be no problem, as this process is dependent on the Moodle "application" itself which is "bit agnostic".

3. Performance gains are relative, and will depend upon the new hardware, the new OS, any changes to the PHP and Webserver 64 bit version, whether you are, or have been using PHP accelerators etc. With the latter installed, you are more dependent overall on the efficiency of your hardware and database, as PHP compilation occurs less often.

For some more info, check out this thread ...

 http://moodle.org/mod/forum/discuss.php?d=68845

regards

Gary

 

In reply to Rob Duncan

Re: 64 bit Moodle

by François Marier -
Hi Rob,

In our testing, we have found that running PHP in 64 bit mode takes a _lot_ more memory than in 32 bit. Which means that we couldn't serve as many clients with the same amount of memory.

So we typically use 64-bit machines for database servers (it's much faster there) and 32-bit machines for web servers.

If you're doing SSL, that's apparently another area where 64-bit machines shine.

Cheers,
Francois

In reply to François Marier

Re: 64 bit Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi François

> In our testing, we have found that running PHP in 64 bit mode takes a _lot_ more memory than in 32 bit machines ...

That is bad news. My understanding was that, this was the case in the initial 64 bit versions of PHP but later sorted out. Could you give more details of the setup, how you measured and the results?
In reply to Visvanath Ratnaweera

Re: 64 bit Moodle

by Rob Duncan -
Gary, Francois,

Thanks for your replies, I had realized that Moodle was not 64bit but rather the OS and other apps (so obviously no problems with migration- of course!), apologies for the title, here is a little more information about the setup. Currently we have our Moodle site deployed over 2 servers, we need a big boost in performance and some resilience / redundancy, soo... We spent a good deal of money and bought

F5 Loadbalancer
4 x Dell M600 blades (2 x quadcore each, 4GB ram)
600GB SAN space allocated (4Gb HBA )

we're going to have a Master/Master MySQL backend
and an Active/Passive apache cluster
F5 is going to loadbalance, give VIP's and monitor the services- i.e heartbeat.(gonna need a second f5 too!).

Just from a glance would you recommend 64bit in any part of the above?
-It's RHEL v5.0
In reply to Rob Duncan

Re: 64 bit Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Wow, that's heavy iron!

I wonder what is the kind load you anticipate? Or why and when is the current server inadiquate?
In reply to Visvanath Ratnaweera

Re: 64 bit Moodle

by Rob Duncan -
Hi Visvanath,

Yep it is heavy iron, we have 7,000+ users, which isn't a problem for most of the year, we get hit hardest at Exam time when our concurrent users go thru the roof. (so that's the why and the when) We looked at a few options, VMware being one of them but decided to go with real servers until we are more familiar with virtualization, the main reason for the clusters is redundancy, we went down for an hour last year because one of the SCSI drives melted - no hot standby, had to rebuild from RAID. so we don't want that happening again and have designed this with no single point of failure- that's why we need a second F5! It may be overkill but at least there is room to maneuver now
In reply to Rob Duncan

Re: 64 bit Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Agreed. Scheduled exams using the quiz module generate heavy peaks. You are aiming at two things: high-performance and high-availablity, which isn't easy.

I still question why this big jump in demand between old version 1.6 and current 1.9. From the reports here the demand has risen by an order of magnitude! The major reason being the new role model. I know, it is not relevant to you, but wonder how much Linux, _lot_ or RAM (therefore 64 bit), lighttpd or nginx combined with Moodle 1.6 would have delivered.
In reply to Visvanath Ratnaweera

Re: 64 bit Moodle

by Martín Langhoff -

My diagnostics indicates that the size of the compiled PHP code in memory doubles.

Additionally, some data types grow, but the main cost is that the overhead for every variable roughly doubles up.

I personally measured this with

  • Tracing PHP crashes due to hitting max_mem limits in early Moodle 1.8.x, which was due to compiled code size.
  • ps_mem.py, used with a modern Linux kernel
  • /usr/bin/time, and executing php scripts on the commandline. Just look at the minor/major pagefaults. Note that bash has a built-in 'time', so you often have to use the full path.
  • top (which is fairly rough)

Anyway, PHP extensions and precompilers on 64 bit are still maturing, and are often buggy. Between instability and memory usage, 64-bit for the Apache/PHP servers is a lose-lose scenario right now.

Things should be getting more stable though as 64-bit usage expands, but that depends on the specific distro and extensions you use, and your own definition of how stable is stable smile

Memory usage is unlikely to change, I suspect. It is well known that codesize is significantly larger in the kind of chips marketed as "64-bit".

As Francois says, it is win-win for the DB server OTOH.

In reply to Martín Langhoff

Re: 64 bit Moodle

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Doubled memory usage is not always bad, it is sometimes possible to hit integer limits, for example id field in our db tables and 2GB filesystem limits.

PHP support for 64bit systems is improving with each release, I started using 64bit on my dev machine 3 years ago, I did not see any major problem except the memory use.

There are ways to improve the memory usage, if I understand it correctly the new Compressed Object Pointers option in latest Java is one of them.