Second_Event (off_timer) Optimizations

A place for developers to discuss development of OSA
Post Reply
Message
Author
Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Second_Event (off_timer) Optimizations

#1 Post by Vaughn » Sun Oct 09, 2016 7:41 am

The event that runs in MySQL every second had many inefficient calls in it.

The main culprit was the biggest view in OSA the osae_v_objects view. Many routines we using that view just to get a single piece of information, which was way to expensive and over worked the DB. Every one of those calls has now been replaces with a special task-built view or direct SQL so no more is read than necessary.

For example, the plugin properties on the SYSTEM object are checked and updated every second, well, counting the plugs hit the osae_v_object view 4 times. All of those calls for counting plugins have been moved to efficient functions.


This concluded my performance fixes for this release. I did not record before or after metrics, I just knew these calls were expensive and bad and hopefully help the system run cooler and on lower powered devices.



Vaughn

Post Reply