CS Tidbits #23: Tweak Your Mirrored Content Job

Today's tidbit is another easy one to implement that would otherwise go unnoticed unless you were experiencing the same issues that some of the CS MVPs were having on our dedicated box.  Short version: If you have more than a trivial number of feeds defined for a mirrored content section (in my case, I have over 50), the RollerBlogUpdater job can bog down your system when it kicks off, i.e. peg the processor at 100% and bump memory up a couple dozen megs when it runs.  Does this happen in all instances?  I don't have any hard data to back that up, but the 2 cases I've seen where more than 20 feeds were defined it was indeed occurring. 

Long version: Easy explanation...latency.  Well, latency combined with the fact that the job which fetches mirrored content executes on the main thread of CS, which means it blocks execution until the job completes.  If you have 50 feeds to pull, and latency averages 1 second, that's 50 seconds for the job to run with the caveat of blocking execution for anything else running on the main thread as well as pegging the processor the entire time.  On a dedicated box this might not matter, but in a shared hosting scenario this could lead to overall degradation of the machine depending on A) how many sites the box is hosting and B) how many of those are CS sites with a non-trivial amount of mirrored content feeds.  It is worth mentioning that the memory is reclaimed fairly quickly whenever garbage collection kicks in, and of course the processor settles down once the job completes, but the fix is trivial: put the RollerBlogUpdater job on its own thread by editing your CommunityServer.config, adding the singleThread = "false" attribute to that job node:

<job singleThread = "false" name = "RollerBlogsUpdater" type = "CommunityServer.RollerBlogs.Components.RollerBlogUpdater, CommunityServer.RollerBlogs" enabled = "true" enableShutDown = "false" />

Now when that job kicks off, it'll spawn on it's own thread (thus not blocking main execution) and processor utilization will be normal while the job runs.

Filed under:


# Community Server Daily News said:

news of the day a grab bag for what's happening in Community Server Please God, nooooo! Geoff Appleby

Monday, October 16, 2006 2:20 PM
# J-O Eriksson said:

Let's say you get even more mirror feeds. Have you tried running the RolleBlogUpdater on a completely different machine with the help of the Jobs Service, or would it need some context which is looses then?

Wednesday, October 18, 2006 1:25 AM
# Community Server Bits said:

Jayson Knight with a CS Tidbit on improving server performance by putting the RollerBlogUpdater job on

Monday, March 12, 2007 6:41 AM