1 / 20

Kentico CMS Performance Optimization

Kentico CMS Performance Optimization. Implementation at Newsmax - Ayush Chaturvedi. Agenda. The Newsmax Project Architecture, load and performance Optimizations Queries Code Caching Database Application Server Front End Optimizations. Newsmax Project. Site layout

love
Download Presentation

Kentico CMS Performance Optimization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Kentico CMS Performance Optimization Implementation at Newsmax - AyushChaturvedi

  2. Agenda • The Newsmax Project • Architecture, load and performance • Optimizations • Queries • Code • Caching • Database • Application Server • Front End Optimizations

  3. Newsmax Project • Site layout • One instance two sites www.newsmax.com, www.moneynews.com • Centered around articles • Customizations & features like slideshows • Notice urls • High load, High performance and High availability • Project Layout • Dev –Dev Test– Stage - Production • Load balanced on two servers • TFS team and build automation is used.

  4. Newsmax Project Contd.. • Avg. visits a month ~ 20,000,000

  5. Newsmax Project Contd.. • Best case on a single day ~ 3,000,000

  6. Newsmax Project contd.. • Our experience with Kentico • We have grown as Kentico has over the last year. • Seen Database CPU from 99% to 3-4% . • From versions to versions till 5.5 • 5.5 is the real enterprise class CMS

  7. Where are we? • The Newsmax Project • Architecture, load and performance • Optimizations • Queries • Code • Caching • Database • Application Server • Front End Optimizations

  8. Optimizations • Kentico CMS off the shelf + efforts at Newsmax • Off the shelf: caching, indexing, queries • Newsmax: more caching and cache management, more indexing and stats and query tuning. • UPGRADE TO 5.5 (V.V. imp.) • Understand Kentico CMS is a normal ASP.NET web project. Many

  9. Optimization - Queries • Understanding what queries run on a page request • User request  query to node alias query to documentpath query to documentaliases • Initially aliases then document url path • One page to serve all articles. /{section}/{keywords}/{year}/{month}/{date}/id/{id} • Understanding the three tables that create a document • Cms_tree, cms_document, doctype tables • Difference between select and selectdocument • Define select columns, avoid selecting ntext {nvarchar(max)}columns for listing controls • Extreme case (not recommended unless justified) modify view_doctype_joined

  10. example SELECT ##TOPN## ##columns## FROM dbo.View_CMS_Tree_Joinedct INNER JOIN dbo.Newsmax_Articlena ON ct.DocumentForeignKeyValue = na.ArticleID AND ct.NodeClassID = 2046 INNER JOIN dbo.customtable_SiteSectionArticlescssa ON (na.NMID = cssa.ArticleID AND ct.Published = 1 AND ct.NodeParentID = @parentID AND cssa.SiteSectionID = @SiteSectionID) INNER JOIN dbo.customtable_SiteSectionscss on cssa.SiteSectionID = css.NMID ORDER BY CASE ##ORDERBY## SELECT ##TOPN## ##COLUMNS## FROM View_Newsmax_Article_Joined inner join custom tables WHERE (##WHERE##) ORDER BY ##ORDERBY## // joining a view of views to another table. !!Again not recommended unless you are an expert and willing to support.

  11. Optimization - Code • Scheduled tasks, use wisely • Portal development mode reduces custom code. • Output filters. Use only if absolutely needed. • Store images on both file system and db • Ondatabound Processing. • Avoid queries to databases, use cached context variablesand macros. • Monitor eventlog and clean errors. Exceptions cause performance problems. E.g. missing image in a CSS.

  12. Where are we? • The Newsmax Project • Architecture, load and performance • Optimizations • Queries • Code • Caching • Database • Application Server • Front End Optimizations

  13. Optimization - Caching • No cache no performance. • Levels of caching • Data cache, partial cache (asp.net output cache), full page cache, IIS output cache • Implementation of keys and cache expiry mechanism is critical • E.gNewsmax custom dummy key based cache dependency newsmax|custom|sectionid|16 • Cache expiry handling in 5.5. Refer Martin’s blog post. • At Newsmax we cache the latest 6000 articles • Have images cached

  14. Optimization of Database • SQL 2008 (advanced level for DBAs) • DB Architecture • Cluster, failover configuration. • RAID Drive mounts and locations. • TempDB. • Backup Scheme.

  15. Optimization of Database – Contd. • Query tuning • Specially for custom tables • Data tuning advisor, index usage stats • Index_seekvsindex_scans • Too much indexing and stats can cause wrong compilation plans • Keep an eye on compiled plans and single use ad hoc queries • Optimize for ad-hoc workload • Forced parameterization • Case of Order by 1 • Understanding AWE and PAE switches • Depending on your DB size. • Min and Max memory setting • MaxDOP setting

  16. Optimization – Application server • Load balanced • Multiple core (i7), SSD drives, 32GB RAM, Windows 2008 server. • IIS recycling set to a particular time. • Redirects done in IIS rather than in the CMS

  17. Optimizations – Front End • Often neglected • Image compression • CSS and JavaScript mimification • CSS and JavaScript compression • Use of CSS sprites • JavaScripts to the bottom of the page. External if possible. • Using client browser cache (E-tags) • Minimize HTTP requests (e.g. libraries for front end validation)

  18. Optimizations- Even more • For superior caching consider 3rd party tools like Memcached • Use Content Delivery Networks • For extremely large datasets 100s of millions consider partitioning DB tables. • Future DB cluster support in Kentico.

  19. About Myself • Working as Systems Architect at Newsmax Media. Advertise with us we get a lot of traffic!! • Worked at fortune 500 companies like H&R Block with training at Microsoft. • Background in CMS and ERP systems. • Provide offshore troubleshooting and development services. • Interested in solving problems and discussing solutions. AYUSH CHATURVEDI ayushc@newsmax.com ayush4284@gmail.com 001-816-716-4843 Please collect business cards !! Feel free to contact. Credits: Thanks Karol, Neil and Martin for their inputs.

  20. Questions?? Questions??

More Related