MySite scalability

Events happening in the community are now at Drupal community events on www.drupal.org.
boris mann's picture

Hi Ken --

I know you've deployed MySite on some large sites, and was wondering if you have any specific comments on the scalability aspects of MySite. Caching of data that gets pulled per user necessary? Fine out of the box because each user has a custom page (assume private)?

Feedback and techniques appreciated.

Comments

Hm

agentrickard's picture

I actually don't have any large scale implementations. Others might.

I know killes is running it, and he has some large sites. Here are some architectural points:

  • Most of the MySite code only loads on /mysite/* and admin/settings/mysite/*
  • Including all JS libraries and MySite include files

  • MySite has an internal cache that can be enabled. It provides per-user-page caching. The MySite cache applies to any user looking at the page, even the owner. This is stored in {cache}.

  • The overhead (if any) would be caused by all the node_load() calls necessary to generate a page with 500 nodes on it.

  • You can throttle this by restricting
    a) The number of elements allowed on a user page (default is 10)
    b) The number of items allowed per element (default is 5)
    -So, worst case out of the box, /mysite/* loads some extra PHP and JS files and calls node_load 50 times.

  • User pages default to public, but that can be changed per installation with a setting.

My biggest concern, actually, is the mysite_cron() function. That function is designed to sweep through MySite accounts and look for content that no longer exists. If so, it deletes it from the user's colection and leaves a note. That could turn out to be a very intensive operation. Currently the mysite_cron() can only run once per day.

--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3

Thanks

boris mann's picture

OK, thanks for the tips. I think I can boil the best practices down to:

  • make pages private
  • turn on cache (nice!)
  • limit number of elements / items per page

Cron is an icky icky thing. I need to revisit Earnest's multi-threaded cron patch...

Private

agentrickard's picture

I don't think that making pages private is a big deal. How likely are you to look at my page? And with caching on, it makes no difference.

--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3

MySite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: