Archive for March, 2008

Opening Up RSSmeme For Publishers

Monday, March 24th, 2008

In case you haven’t noticed; I’m beginning to open up RSSmeme bit by bit.  If you are a blogger you can now automatically embed the number of shares for each post directly on your site or in your feed.

All the details can be found at RSSmeme.  I should note that the FeedBurner FeedFlare and widget accomplish two different goals.  The widget is nice because 1) you don’t need to be using FeedBurner and 2) it allows visitors who never frequent your RSS feed to see your share count and click on a link to share the post.  FeedFlare can accomplish this same goal if you install FeedFlare on your site (which is a similar process to installing the widget).  The FeedFlare will always have older data than the widget.  The widget is only cached for 5 minutes and I am not sure how long FeedBurner caches for but it seems to be on the level of hours not minutes.

Installing the widget seems daunting at first but it really is very simple.  The one gotcha I’ve noticed is people who install it but don’t wait for the page to fully load before assuming that it is not working.  The widget waits until the page is completely done downloading before working it’s magic.

A full fledged API is on my todo list.  I’m not sure how many of you would use it (not very many I’m guessing) but I’ll try my best.

Many thanks to Louis Gray, Steven Hodson, Frederic, and Chris Brogan for installing the widget/FeedFlare.  Check out their blogs to see it in action.

Spring Break!

Friday, March 14th, 2008

Yes, even “adults” like me get to have a spring break!  Megen and I will be headed out to Toronto for the weekend.  We are staying in the swanky Sutton Place hotel on Bay Street.  Then it’s back to work for me from Monday to Wednesday.  On Wednesday night we are headed to Cleveland for Megen’s sister’s match day.  We’ll be in Cleveland from Wednesday night to Sunday afternoon.

So expect no updates to any of my projects for the next week.  I do have things in the pipeline for RSSmeme but you’ll have to wait a little bit longer to get them.  I promise that one of them is something that nobody else has done in this field and will be much appreciated by some publishers.

Ben and Megen

Wednesday, March 12th, 2008

I’ve started writing more over at Ben and Megen so stop by if you’re interested.  That’s where I write about things that Megen, Loki, and I are up to; wholesome family fun.  I used to run it off of Wordpress and Gallery2 but now it uses Blogger and Flickr.  I’m considering switching this site to Blogger as well.

VPS – Not All Fun and Games

Wednesday, March 12th, 2008

I idle in #slicehost, an IRC channel for my VPS provider, and see people come in all day long complaining about how slow their app is running on Slicehost compared to shared hosting. Nearly every single time the user installed Ubuntu (not that there is anything wrong with that; it’s what I use) and are using apache + mysql.  Most of the time they are running a 256MB slice but on occasion you’ll see someone come in with a 256MB slice and upgrade to a 2048MB slice because they think it will help.  It won’t; they are wasting money.  They need to learn that there is more to setting up a VPS than:

sudo aptitude install apache2

Most of the time it isn’t that they have terrible database indexing.  It isn’t even that they aren’t caching anything.  The problem is that they keep the Ubuntu apache default settings which spawns over 100 server processes.  Each one takes up at least 15MB and brings the server down to it’s knees.  As soon as your server starts swapping it’s performance is going to take a nose dive.  So let’s reduce the number of processes apache spawns:

sudoedit /etc/apache2/apache2.conf

And search for this section and make these changes (assuming you are using the default prefork module):

<IfModule mpm_prefork_module>
    StartServers          2
    MinSpareServers       2
    MaxSpareServers       4
    MaxClients            4
    MaxRequestsPerChild   250
</IfModule>

That is a good place to start; everyone will have to tweak these as necessary but for a 256MB slice it should work well.  It tells apache to start with 2 processes, allow between 2 and 4 processes to idle, run a maximum of 4 processes, and to restart a process after it serves 250 requests (which is like a get out of jail free card if you are leaking memory).  Note that this does not mean that you can only handle 4 users at a time.  It means you can handle 4 requests at a time and any other requests are queued up.  Watch your memory usage (using top or free) and tweak these numbers as necessary.

There are other easy fixes that I won’t get into:

  • Use a separate media server (S3 maybe) and turn KeepAlive off for your dynamic server.
  • Use memcached to cache anything and everything.
  • Reorganize your database.  In mysql try to avoid using blobs if possible.  If you need them then move them off to their own table because mysql cannot cache columns with variable length.  This was RSSmeme’s problem; a database reorganization that took 5 minutes resulted in complex queries taking .01 sec instead of 5 sec.
  • Fine tune your database.  Depending on your app you might consider modifying query_cache_size, sort_buffer_size, key_buffer, tmp_table_size, and table_cache.  Removing innodb support (if you don’t need it) will save you an easy 10MB.

And please take everything you read on the internet about fine tuning your VPS with a grain of salt; including this.  I do not consider myself an expert at this; I’m far from it.  I could be very wrong and this could be terrible for your needs.  The point is that you need to put just a little bit of effort into setting up VPS.  Good luck!

RSSmeme – Register

Sunday, March 9th, 2008

You can now register your own Google Reader shared feed with RSSmeme.  I never planned on adding this feature because RSSmeme crawls the web looking for feeds.  I used to find 100s of new feeds a day but that number has dropped significantly in the last few days (have I found you all?) so I reluctantly added a submission page.

I didn’t plan on adding this feature because I thought it was superfluous.  Every single time someone asked me to be added to RSSmeme they were already in the database.  This is probably because if you are the type of person that wants to be added to RSSmeme then you probably already put your feed on ReadBurner, Shared Reader, or FriendFeed and I already found you.

It turns out this is actually a good way to find out if you are already in the system.  If you are unsure you can just submit your Google Reader shared feed and RSSmeme will redirect you to your page (and add you if you aren’t already there).

Try it out!