Performance impact of 100+ SSI directives

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 :slight_smile:

  • Max

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

On Thu, Mar 17, 2011 at 1:30 AM, Hone W. [email protected]

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