work related

December 10, 2009

RHEL5 vs. MySQL

To date we are keeping the entire (d)oodle infrastructure in VM space. I plan on running this way for its entirety if I can. This includes app-servers, database servers, and TrafficManagers.

Running dedicated MySQL in the 'cloud' environment has its own interesting bumps and one of them is finding out what the memory is actually doing. When running MySQL with the options that we have selected the OS needs to give mysql what it wants when it wants it. There is a smallish print line in the MySQL manual which goes something like this..

Wrestle OS to keep MySQL out of swap space..
This is very true of RHEL5.

I'm finally getting somewhere with giving MySQL actual large chunks of dedicated memory. RHEL5 has a very low setting for dealing with hugepages and the likes (regardless of i686 vs x86_64). Adjusting these settings has opened up more memory for MySQL to grab and hold onto.

I'm not finished polishing off the db servers themselves in this regard but this next week will be a telling week for the current setup.

December 10, 2009

TrafficManager Fun

Setting Moodle into maintenance mode is now quite effortless and a bit fun as well.

I created a home cooked idea using our Traffic Manager and its Rule processing capabilities. The idea is this: using the maintenance rule attached to the Virtual Server the user is sent an "In Maintenance" page. This page also has the capability of refreshing on a given interval. So the user can set it there and then come back in a few minutes to check again.

Why bother? Maintenance is maintenance - right?.

Here's my take. I'd rather see something than get the - Firefox can't find the server at moodle.iup.edu - message back from my browser.

Here's how this can be done:

  • Create your custom html maintenance page. And upload it to the Extra Files area of your TrafficManager.

  • Create your maintenance pool. Use any (or all) of your production pools nodes, only this time pick a random port not in use (ie: 8888). Place all nodes in drain mode, you will have to check the box to confirm this action. Adjust these settings under the pools 'Connection Management' area.
    • keepalive = no
    • max_connect_time = 1
    • max_reply_time = 1
    • error_file <- here is where you select you maintenance file

  • Now create a new "Maintenance Mode" rule with the following Actions
    Choose Pool (your maintenance pool) Save your new rule.

  • Using Services -> VirtualServers Select your server. Under the rules area add your new Maintenance Rule. You can Enable or Disable this rule in the future from here with no other changes to the VirtualServer

Pretty slick, now you have a, on-the-cheep, Maintenance page with little effort.

Note: I have created this environment using the zxtm-lb version of the TrafficManager. This provides some inflexibility when serving image content. For my Maintenance Page I host the two images on an outside of zxtm web accessible space.With full zxtm version you would not need to store images else where.