I'm looking into a case where all sandboxed solutions runs terrible, not only slow, but they use abnormally a lot of resource points too.

Its not a large farm, 3 server + sql. All running on HyperV.

Server 1: Acts as Front End, 8GB Ram Server 2: Front End, 8GB Ram, HLB with Server 1 Server 3: App, 12GB Ram

SQL: 16GB Ram

Dont remember CPU cores atm, but I think it was 8 cores pr server.

I made a dummy solution for testing in their farm, since I don't have access to their code. I made a simple solution that runs a query to a list 10 times. And after hitting the run button for some time, 25 times maybe the resource points was up in 47 ( I know its based on hardware etc, but it says something). And it looked pretty random how long it took to run. Even had execution errors a couple of times, because it took more than 30secs.

I have the same data and list on a test VM here with the same solution, and it is on a shitty VM running on my laptop with 4GB ram. Loaded much faster, and hardly used resource points, less than 1point.

So, anyone know what could cause sandboxed solutions to behave like this?

1 Answer 1


Do you have insight into the limits they setup for the code? they may have set it so high they just have bad code monopolizing the service. That's the first place I would look. For testing, I would block all their solutions than try to run yours.

I would profile the service itself and see the resources it is consuming on average and the peaks, you could use native perf counters or PStools Process Monitor.

Also check the conifiguration of the service itself (courtesy of MS http://technet.microsoft.com/en-us/library/hh230318.aspx):

#Recycle the UserCode Service
$server = [Microsoft.Sharepoint.Administration.SPServer]::local

$type = $server.GetType()

foreach($method in $type.GetMethods())
     if( $method.Name -eq "GetChild")
          $getChildMethod = $method

$genericMethod = $getChildMethod.MakeGenericMethod([microsoft.sharepoint.administration.spusercodeserviceinstance])
$userCodeServiceInstance = $genericMethod.Invoke($server, $null)

You can tweak these if there hardware will support larger values (depend on normal load). If they already have this configured to far above the defaults, it could also be causing problems if the machines can't handle it (hence neededing to profile it above)

Additonally, if they are running it on the APP server only, you may want to consider running it to the two web serving VM's as well to laod balance the service.

Becouse these are VM's you will want to look at the host utilizations as well, if the CPU / Memory is over subscribed this could be causing locking issues on the host, and thus your processes are taking longer as they are waiting for the CPU request to process.

  • Looks more like a issue not directly linked to SharePoint, more a hardware/hyperv issue. I'll mark it as an Answer because it looks like you cover the most common issues around performance and the sandbox service :) Commented Jul 3, 2012 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.