Performance comparison of grav vs other database-based CMSs

Hi,
after I created a static website for my friend. Now I’m thinking to create my own blog website using grav. I’m still considering the performance of grav as flat CMS compared to database-based CMS (such as Wordpress or OctoberCMS). Is there any significant performance if I have 100 blog posts?

Thanks.

flat file site faster then Wordpress and other if your site have 500 pages (pages, posts, etc) max

The performance will be significantly impacted by other factors than the amount of pages/posts, especially in terms of server setup. For example, you should consider the PHP-version utilized, the database, the server specs, and of course what measures you have taken to optimize the site.

There is no certain cut-off point here in terms of declining or significant performance as far as pages/posts goes, but certainly the organization can be unwieldy with a large amount - which is a subjective opinion. Personally I would still prefer a flat-file CMS like Grav with amounts up to 1000 because of the more efficient setup and vastly decreased overhead and bloat.

Prior answers are correct. There are lots of factors involved. If you host your site on a modern web server with SSD drives, your Grav site will support a good many pages, and still be 10X+ faster than any DB-based CMS.

This does not necessarily mean expensive hosting. Even a $5/month digital ocean VPS will allow you to have an incredibly fast site with Grav :slight_smile:

$5 a month is a very good price for a VPS. I run on shared hosting, and because Grav itself is very small and even a large amount of pages will technically be small (apart from responsive images, but you could just as easily host those elsewhere) it will make an insignificant impact on server resources, bandwidth and space (which on almost all shared hosting is advertised as unlimited, but really stops at 10-20GB per site).

@whytwo I have seen no (real) performance benchmark yet to compare Grav with other database-based CMSs. And as others said performance is impacted by other factors. Clearly and if you want to compare things, you must run both on the same webserver. Secondly, they must provide the same functionality. Wordpress and Co are much more feature rich, but most of the core features can be disabled. Further (and if you want to be fair) you have to switch on caching for Grav and use a caching mechanism for the DB-CMS, too.

If you do that, I’m pretty sure you won’t see much differences at all. I really don’t know where the speed factor of 10X+ @rhukster is mentiong is coming (sorry @rhukster, but I have seen no prove of it yet). But it will definitely not that much and will differ on your test cases.

Usually DB-CMSs crawl their data and the page from a DB. They don’t need powerful SSD at all, but can be boosted with them, too. Databases are constructed to be highly packaged, fast and optimized for low memory usage. Grav instead relies on a fast file system. It has to iterate ove r all files to construct the cache. Thus, the hard-drive is the penalty here and speed due to (random) reads of the disk is important.

Other than DB CMS, Grav loads the whole routing and page structure informations for every page request into memory. For lots of pages this can result in high memory consumption and speed is degradation due to the mentioned above penalty, too. DB CMSs just do a (simple) fetch and don’t have to load all data into memory and that’s all.

In the end it is a matter of taste, why you are using file-based or databased systems. Both have cons and pros. The only thing you really have to take care of is to use a CMS, which is stable, has a big/good community and uses much of the new features (compare e.g. PHP7 with PHP5.6) of the system to improve the overall speed and performance.