Author Topic: Supervisor tuning  (Read 4483 times)

anthony

  • Senior Software Engineer
  • Hero Member
  • *****
  • Posts: 183
Supervisor tuning
« on: March 28, 2006, 03:41:51 AM »
The topic of supervisor responsiveness is a very important issue for qube! users and administrators alike.  While we have placed alot of time and effort into making sure qube!'s supervisor is as fast as possible, we have also in the intrests of hardware capability and backward compatability have setup the supervisor to actually run sub-optimally in order for it to run on even a little laptop. 

One of the first items on the list is the issue of "max connections reached" errors in your logs.  This is a warning that the supervisor's active threads are all currently busy and the client application has been notified to try again later.  (typically 40 seconds later)  The supervisor by default is configured with only 16 active threads.  This is because with every thread the supervisor keeps active, it requires a measurable amount of memory and it was our concern that installing the supervisor on a lower end host would swap because of this.  However for studios/facilities which have allocated significant hardware to the supervisor, this setting can be easily tweaked.  There are 3 performance options which allow you to adjust this. All of these are found in the qb.conf file.

First setting:

     supervisor_max_threads

          This option adjusts how many simultaneous connections you allow.  Please keep in mind the higher the number the more memory it will require. 

     supervisor_idle_threads
     
          This option adjusts how many of the supervisor's threads are to remain alive at all times.

     supervisor_max_clients
 
          This option determines how many connections a single thread is allowed to process before exiting.  The higher the number the more memory you'll need.  However it also means that the supervisor will have to do less work to replace the threads which have exited. 
     
     There is another component of qube!'s supervisor which you may tweak.  This however requires a solid knowledge of mysql.  While we don't normally expose this option to our clients, for administrators who are willing to take on the task, it can improve supervisor performance by 20-30 percent. 

     First mysql must be adjusted to allow a large number of simultaneous connections.  This is adjusted in the my.cnf file.  You need to adjust max_connections

[mysqld]
set-variable = max_connections=400

     This allows the supervisor to connect with all of it's threads at one time.  Normally mysql is set to allow only 8 simultaneous connections.  This forces the other threads to wait.

     The second option you must set is in the qb.conf file. 

     database_flags = lazy

     This option (while admittedly undocumented) tells the supervisor to only disconnect from the mysql database whenever it absolutly has to and not after every query.  This significantly reduces connection load between qube!'s supervisor and the mysql database.  (Please note that incorrectly adjusting the mysql daemon by not increasing the max_connections, could potentially create a deadlock between qube! threads, this is why we recommend it for experienced admins)

     Further methods of increasing qube! performance includes specifying the qube! supervisor's name in the client qb.conf files so that a auto-discovery isn't necessary.
   
     If you have any questions, please continue this thread.

     Thanks,
           Anthony


turi

  • Full Member
  • ***
  • Posts: 11
Re: Supervisor tuning
« Reply #1 on: April 14, 2006, 05:51:33 PM »
I am using windows version of qube supervisor. What is the password for mysql account?

anthony

  • Senior Software Engineer
  • Hero Member
  • *****
  • Posts: 183
Re: Supervisor tuning
« Reply #2 on: April 14, 2006, 08:30:00 PM »
Hey Turi,

    If you're looking to login to the mysql server, we just use the default "root" account.  This account doesn't have a password initialy.

    Anthony