User Tools

Site Tools


Writing /home/user/smartcj.com/wiki/data/cache/9/999da8b22503bdecc64f56e341669ab7.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /home/user/smartcj.com/wiki/data/cache/9/999da8b22503bdecc64f56e341669ab7.metadata failed
new_rotation_perfomance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
new_rotation_perfomance [2014/01/29 18:04] – external edit 127.0.0.1new_rotation_perfomance [2026/03/21 10:11] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
-====== New Rotation Perfomance ======+====== New Rotation Performance ======
  
-With New Rotation you get a lot of pages. Old style rotation was like you create finite number of pages (usually up to ten)+The new rotation is designed to handle large number of pages.
  
-Pretty common situation: 300 categories, 7 pages in each, 3 ways to sort galleries inside category (CTR, date, duration) - it'6300 pages.+Here's a typical scenarioyou have 300 categories, 7 pages per category, 3 sort options (ctr, date, duration) 6300 possible pages. Add pages with embedded videos, and databases of 200,000 are not uncommon.
  
-It doesn't make sense to create those pages each minute so script creates it when someone requests itstores in cache and uses cached version until it expires.+Creating this many pages via cron as static content would be inefficientso pages are generated dynamically and cached. You set the cache time in the config. The shorter the cache time, the more pages per second the script must generate. This directly affects server load.
  
-Thus we have 2 points to remember:+There's also the concept of "warming up" the site. For example, you've just finished setting everything up and are about to send traffic. If you send a large amount of traffic all at once—say 5k visitors—they'll spread across all pages and the script will need to quickly generate all of them, since the site is new and has no cached pages yet. To avoid excessive server load when launching a new site, it's important to ramp up gradually. Start with 1-2k per hour, which allows cache to build for the main pages. Then you can send as much traffic as you need.
  
-1. It takes time to create pages. if cache is empty it is called 'cold startup', we have to "warm up" cache , ie create some mostly visited pages. 
  
-2. Once cache is up it doesn't really matters how many visitors you have as it almost does not consume any resources to give away a page from cache. +Server traffic capacity: Once the cache is built, pages are delivered almost instantly. Here'how it works: when the first visitor hits the index of new site, the script generates the index page and caches it for the duration you've configured. All subsequent visitors get this page from cache with minimal server impact. Even if 1M users access this page during the cache period, they'll get it without problems.
  
 +For a single site, whether you receive 50k or 500k requests, it doesn't matter much because you'll need to generate roughly the same number of pages either way.
  
-Thus if you have 1 site with  50k or 500k traffic - it doesn't affect your server load too much as pages in most case will be cached. But if you have 5 sites with 10k traffic on each - it won't be the same at 1 site with 50k traffic as we have to create a full set of pages for each site.+However, if you have 50 sites with 10k eachthe load is much higher than 1 site with 500k total, because you need to generate 50 times more pages (assuming the same database size and number of categories).
  
 +Database size also directly affects load: a 100k database translates to roughly 3000 pages depending on design, while 200k means 6000 pages.
 +
 +To give you perspective: the maximum configuration we've seen is 31 sites on one server with 1.5M galleries total (roughly 5M gallery-category combinations and thumbnails), delivering 280 Mbps at peak.
  
-Beside that your layout affects load: ie if you have 3 options to sort content it will be "total amount of pages * 3", while if you have just 2 ways to soft it (it depends design actually , ether you have a link to another way to soft it or not) - you'll get less page to create => less load on server. 
new_rotation_perfomance.1391018680.txt.gz · Last modified: by 127.0.0.1