Optimising STACK in a clustered environment

Optimising STACK in a clustered environment

by Dom Royko -
Number of replies: 5
Picture of Plugin developers

We are currently testing STACK, and would be deploying it in a clustered environment with several Moodle compute nodes.  We have yet to run performance tests to see whether a separate Maxima server is required, so are currently trying running Maxima on the same server as Moodle.

My question is this:  When optimising Maxima, I ran through the command line procedure to produce a /usr/bin/maxima-optimised image.  Assuming that all the compute nodes are the same in terms of software and (virtual) hardware, would it be safe to simply copy the image to all the nodes, or would I have to run the procedure on each node?  I ask in order to minimise the time taken, and the number of error-prone manual commands we need to execute, during upgrade.

Some numbers:

Ubuntu 14.04.3

Maxima 5.32.1

gnuplot 4.6 patchlevel 4

Moodle 2.8.9 (Build: 20151109)

Advice from anyone with experience with this scenario is welcome.

Thanks,

Dominik.


Average of ratings: -
In reply to Dom Royko

Re: Optimising STACK in a clustered environment

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, you can safely copy maxima-optimised, as long as you are copying it to a place with the same version of Maxima and STACK.

In reply to Dom Royko

Re: Optimising STACK in a clustered environment

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Using the servlet means that copies of Maxima are already loaded and so you get a performance benefit unrelated to the amount of work/calculations needing to be done.
In reply to Marcus Green

Re: Optimising STACK in a clustered environment

by Dirk Grunwald -

I'm curious if someone has created a Dockerfile to build a version of Maxima with the tomcat server as mentioned in the documentation for the "server version".

We run Moodle using Kubernetes in Google Compute Engine, using a set of containers for Moodle, Jobe/CodeRunner, MySQL and LetsEncrypt. I'd like to add another one for the maxima server, but from the dox it seemed like the server needed to be on the same server as Moodle?

Seeing a Dockerfile or talking to someone who has done this as a server might help resolve this issue for us. The point of using Kubernetes is to simplify autoscaling on load.

In reply to Dirk Grunwald

Re: Optimising STACK in a clustered environment

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The MaximaPool server does not need to be on the same server as Moodle. It is better if it is not.

I assume you have already read the docs at https://github.com/maths/stack_util_maximapool and https://github.com/maths/stack_util_maximapool/tree/multiple-pools/doc

In reply to Tim Hunt

Re: Optimising STACK in a clustered environment

by Dirk Grunwald -

Yes, and that was part of the confusion - the stack_util_maximapool writeup made it sound as if things needed to be on the same moodle server, but I see in looking at it that it just needs access to the STACK plugin directory which I would pull in from GIT. All the "edit by hand" comments indicate it may be a bit messier than other containers we've setup but should be doable.