# Performance impact of 100+ SSI directives

**URL:** <https://www.ruby-forum.com/t/performance-impact-of-100-ssi-directives/204607>\
**Category:** NGINX\
**Created:** [March 16, 2011, 7:50pm UTC](https://www.ruby-forum.com/t/performance-impact-of-100-ssi-directives/204607 "2011-03-16T19:50:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 16, 2011, 7:50pm UTC](https://www.ruby-forum.com/t/performance-impact-of-100-ssi-directives/204607/1 "2011-03-16T19:50:30Z")

</div>

Hi everyone,

I’m trying to refactor a website composed entirely of static files.  
Part of the content is a long list of scientific publication  
references (\> 100), which are all listed on a common publications  
page, and also repeated on other project-specific pages.

I’m considering placing each reference (1 line of text) into a  
separate file and using SSI directives to include those files as  
needed throughout the site. The reason for doing this is that the  
references are not static. The publications go through several stages  
(under review, in press, published), which are reflected in the  
references. On top of that, we occasionally need to make formatting  
changes and it’s a bit problematic trying to remember all the  
different places where a reference is used.

The question is how would nginx deal with more than 100 or even 200  
include directives on a single page? This setup would make my job of  
updating the references easier, but if there is a significant impact  
on the time it takes to serve the publications list, then I would  
rather write some search/replace shell scripts to handle the updates.

Any other suggestions are welcome, but databases and server-side  
coding are not an option 🙂

- Max

---

<div class="post-metadata">

**Author:** ![xamdam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/d78d45/32.png) [@xamdam](https://www.ruby-forum.com/u/xamdam)\
**Post date:** [March 17, 2011, 1:32am UTC](https://www.ruby-forum.com/t/performance-impact-of-100-ssi-directives/204607/2 "2011-03-17T01:32:35Z")

</div>

My personal experience is the more SSI includes you have the more  
CPU’s are used.

---

<div class="post-metadata">

**Author:** ![xamdam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/d78d45/32.png) [@xamdam](https://www.ruby-forum.com/u/xamdam)\
**Post date:** [March 17, 2011, 11:53am UTC](https://www.ruby-forum.com/t/performance-impact-of-100-ssi-directives/204607/3 "2011-03-17T11:53:38Z")

</div>

On Thu, Mar 17, 2011 at 1:30 AM, Hone W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> My personal experience is the more SSI includes you have the more  
> CPU’s are used.

I personally don’t have any experience with SSI, but I think CPU usage  
isn’t going to be a limiting factor in performance here: I can imagine  
the CPU being used more, but with 100+ SSI includes, meaning 100+  
files can’t mean anything else then 100+ IO operations. Having that  
many separate files might become an issue without proper caching in  
place. I’d strongly suggest you’d use a script to merge all that data  
only each time the data changes, if you’d rather have it in separate  
files. This way your web server won’t have the burden of managing  
hundreds of includes/IOps at request-time.

Just my two cents,  
Luit van Drongelen
