mod_gridfs performance

In my previous post, I announced mod_gridfs. Now, it's time for some numbers. Serving a 3KiB file over a gigabit network on modern hardware, 100 concurrent requests, MongoDB replica set of 3 machines as a backend:
  • NGINX + nginx-gridfs: 1.3krps
  • Apache + mod_gridfs: 6.6krps
  • Apache + mod_gridfs with SlaveOk and one slave: 12.2krps
Not testing with larger files, because this way I'll be benchmarkng OS I/O performance instead of user-mode code.


  1. These numbers are pretty impressive.
    I'll give it a try.

    And... keep the good things coming! ;-)

  2. First of all, great job!

    I think for larger files, there will be more round trip to read mongodb entry and the actual 4KB binary chunks. So performance will go down linearly.

    Maybe take a look at Weed File System. It acts as a key~file distributed store with O(1) disk read.