Weekly Progress

This week was again kinda slow, I fixed some bugs in the cache plugin, its performance is now identical to the default static file implementation and it is usable, no perf improvements yet but they are coming. I read quite a lot of code in the mk_http.c and mk_request.c on how requests are handled, and did do some experiments understanding and modifying them.
I submitted a couple of patches to the Monkey list today which would be kinda nice to have while working on the plugin. I wanted to cache the files by inode (which makes sense especially when links get involved) and had to lstat each time a file comes in, but monkey was getting the stat for each file anyways so I send a patch to include the inode and device number in the file_info struct. I send another patch to parse and put the range information in case it is available so that plugins can use it.

I think my work may have been a bit delayed, so I really hope to have a decent working plugin that improves the performance of monkey by this week. The transition from being a filesystem to a plugin took longer than I thought.

I hope to get an implementation running which mmaps file pages into memory and serve the request directly if they are available. Right now I am trying to find a way to attach information to each request like mmaps for the file rather than fds in stage30 and then write them in a non blocking fashion from stage 40.

Github: http://github.com/ziahamza/monkey-cache

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s