180 likes | 268 Views
Performance-Enhanced MySQL for Data Leverage. Shivinder Singh Erick Franco. Get to Know Verizon Wireless. 74,000. Employees Nationwide at end of 1Q 2013. 98.9 Million. Retail Customers at end of 1Q 2013. Nation’s largest 4G LTE network. $75.9 Billion. Annual Revenue (2012).
E N D
Performance-Enhanced MySQL for Data Leverage Shivinder Singh Erick Franco
Get to Know Verizon Wireless 74,000 Employees Nationwide at end of 1Q 2013 98.9 Million Retail Customers at end of 1Q 2013 Nation’s largest 4G LTE network $75.9 Billion Annual Revenue (2012) 2012 Awards & Honors
Statistics ~500,000 Front page loads/day ~90 queries per front page load 45 MILLION queries per day For the front page only
Business Drivers • Highly robust, elastic environment • Platform for social media promotion • User specific content • Centralized authentication • Ability to host huge number of articles, blogs, videos etc • Sub second response times • 99.9999% availability
vIaaS Standards Operational Framework Database Middleware & Network • Multi Site • For all tier 1 apps • Complete DB integration • Ability to expand horizontally & vertically • DR testing with each deploy • Multiple DB flavours : Oracle, Sun DS, MySQL • Business centric app design • Multi Site • For all tier 1 apps • Complete DB integration • Ability to expand horizontally & vertically • DR testing with each deploy • Multiple DB flavours : Oracle, Sun DS, MySQL • Business centric app design • Five 9’s SLA goals • Automate Failover Testing • Minute growth trending • Reclaim Storage • Query Optimization • Focus on lowering or keeping CPU flat with growth • Health Checks • Active Sessions, CPU Usage • Five 9’s SLA goals • Automate Failover Testing • Minute growth trending • Reclaim Storage • Query Optimization • Focus on lowering or keeping CPU flat with growth • Health Checks • Active Sessions, CPU Usage • Failover Testing • Failover testing in case of database failure • Performed with each deploy • Rolling deploys: Zero Downtime • Datapower consolidation • Code Base Review • In House Benchmark Factory • Failover Testing • Failover testing in case of database failure • Performed with each deploy • Rolling deploys: Zero Downtime • Datapower consolidation • Code Base Review • In House Benchmark Factory
Research & Findings • Intensive OLTP transactions • Vendor Driven Code Base • Custom static content for entire user base • High Volume trending topics – Unpredictable customer behavior • Total Overhead = N/W + Authentication + Code
Multi Step Approach • Identify erratic code • Identify technical + Business KPI’s • Build KPI centric operational framework • Benchmark MySQL versions ( 20% gain, still not sub sec) • Identify Constants ( N/W + Authentication) • Modify Variables ( Code Base and query Response Time) • Test multiple scenarios to change variables
Plan Of Action & Implementation • Tune queries • High response time queries vs high volume queries • Identify possible queries for Memcache • Upgrade Drupal codebase from Drupal 6 to Drupal 7 • Potential Challenges • Complete Code revamp (Unpredictable in prod) • Thorough testing • Blending of multiple teams (DBA, Dev, N/w, h/w etc) • 41 Load Tests prior to sharing results with management • Over 100 Mock installs in Dev prior to Prod cutover • 48 hr prod cutover change control • Zero downtime • Deployment in two data centers
Results & Benefits • Achieved sub second response times • Rows scanned over an hour decreased from 1 Billion to 155 Million • 85% efficiency improvement • Rows sent/rows examined % has decreased from 10% to 2.5% • 75% efficiency improvement • Average response times improved by 65% • CPU usage on the DB servers decreased to 97% idle in peak volumes from 80% idle • Helping Green Initiative
Pre Upgrade Query Stats • Pre Upgrade • Post Upgrade
Response Times per Min Overview: Performance & Business Benefits • Performance Benefits • No spikes observed post MSA implementation and performance fixes • Major performance improvements in most called queries • 1489% improvement in user calls to the DB • Front page response improvement even after adding additional functionalities • Ability to perform read-write transactions on both data centers • Business Milestones • Achieved five 9’s SLA • Website performed exceptionally well during iPhone launch • Live webcasts and blogging during iPhone launch • Live webcast during Iphone announcement to the press • Live webcast from CES
Lessons Learned • Complete knowledge & blending is key to success • Like thought process achieve success technical and business • Through planning and focus on failure critical to success • Prod is never same as load test environment • Tailor technology to fit business needs and not vice versa