Welcome to MSDN Blogs Sign in | Join | Help

Warm Up your SharePoint Servers...

Avoid that COLD, SLOW request that baffles users...

Ever thought things on ASP.NET were a bit slow the first time accessing them?  Many of you are aware that ASP.NET from a web admin perspective know that things have to recompile and things just aren't as fast the first time.  In fact some times things are incredibly slow the first time and are incredibly slow.  Ever had users say, for some odd reason some times when I hit my SharePoint site it takes 30 seconds to load, then after a refresh it goes sub second, even clearing their cache the page is fast.  That's because it's not a user issue, its simply compiling, caching, etc... on the server after an IISReset or app pool reset or worker process cycle.

If you're doing demos of an ASP.NET app such as WSS or SPS or Office SharePoint Server 2007, or you simply want your home page to load faster after an IISReset so it's not your users hitting the page for the first time, you may be *very* interested in this post. 

The scripts attached to this post are warm up scripts.  I did not write them.  I asked the guy (Bryan Hart) who built our awesome VPCs (virtual images) if he wrote them.  He did some work on them, but he doesn't claim to have originally authored them.  They are shared via the SharePoint beta 2 Resource DVD (handed out at TechEd 2006 and the World Wide Partner Conference as part of the SharePoint Server VPC image.  I think they're super cool so I'm attaching them for use on your environments.  None of the scripts are compiled so you can feel free to modify them, make them even greater and share them back out to the world. 

Let's say you know that you cycle your app pools at 1am, what if you executed this script to "warm up" the common pages following the cycle?  I'm sure you'll find other creative uses of this script outside of demos which is our most common usage of this script.  I do recommend you compare an iisreset and hit your home page, then try an iisreset and run this script then hit the page.  HUGE difference.  I personally think the warmupscript is more efficient than a browser request in terms of "warming" things up.

Here's the gist of the attached batch and command line executed vbscript...

In the words of the script itself... "This script will run stsadm to warmup the admin interfaces [and] hit each page in the portal to force their JIT."

warmupserver.zip contains the following 3 files:

Startup.bat - Calls the warmupserver.cmd script and passes in the servername parameter (modify this to fit the hostname of your server)

Warmupserver.cmd - checks for servername parameter then leverages the HttpRequest.vbs script to hit the relevant admin pages (change the pages and ports to the relevant ones)

HTTPRequest.vbs - This script executes an HTTP query using the XMLHTTP object

 

Added 8/21:

I recommend checking out some additional tips on this topic from Andrew Connell

I'd say these tips are beyond just for developers.  It's very efficient to cycle just an app pool, or isolate a worker process and kill the process rather than cycling IIS.

I also recommend having the path to the /bin directory in your path variables. (More insight in andrew's post.

One of the first things I do when installing a sharepoint server is creating a command short cut to the bin directory, even though I like to have it in my path.

1. Right click desktop, choose "shortcut"

2. Put in this path: "c:\winnt\system32\cmd.exe" click next

3. Enter "STSADM" or shortcut to bin or something like that and click "next" (Now you've got a command prompt looking icon on your desktop)

4. Choose the new icon on the desktop.  Right click choose properties, change "start in" path to the path to the bin directory: "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin" (path may be slightly different based for x64)

Double click the shortcut...  You now are at the path where you can run stsadm commands, prescans, etc...

Published Sunday, August 13, 2006 4:49 AM by joelo
Filed under:

Attachment(s): WarmUpServer.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Sunday, August 13, 2006 10:17 AM by Kay

# Workflows and workflow task items

I am trying to find out which workflow is adding to my workflow task list in order to check that the person submitting/kicking off the work flow is not in the list of assignto's (same person cant edit and approve their own content) I can hook up events to get at the list but it seems there is no way of knowing which workflow is adding to the list. I am using the out of the box approval workflow..Rite now i am thnking i will have to write the workflow myself which is like re inventing the wheel ...any thoughts ?
Monday, August 14, 2006 10:31 AM by Jason Medero's SharePointing into Collaboration

# Warm up SharePoint after many IIS resets!

Hey guys,
I know that I have been fairly inconsistent in the past month with my postings but I am in...
Monday, August 14, 2006 11:35 AM by Yazan Khasawneh

# re: Warm Up your SharePoint Servers...

Great post dude thanks, I always blame Sharepoint during the first time it runs it is realllllllllllllyyyyyyyyyyyyy slowwwwwwwwwwwwwwwwwwwwwwwwwwwww thankssssssssssssssssssssssssssssssssss
Monday, August 14, 2006 6:04 PM by The Boiler Room - Mark Kruger, SharePoint MVP

# 2007 MOSS Resource Links (Microsoft Office SharePoint Server)

Here is an assortment of various 2007 Microsoft Office SharePoint Server Documentation / Reference Materials...
Tuesday, August 15, 2006 4:42 AM by Steve Sofian's Blog

# MOSS 2007...Start Your Engine

I believe anyone who has had their hands on MOSS 2007 beta 2 would have encountered exteremely slow loading...
Tuesday, August 15, 2006 6:08 AM by hello its liam (trainbloggin)

# MOSS2007 - Warm Up Your Servers!!

For those that have had this problem. You do an IISReset and then it takes ages to load SharePoint Admin...
Tuesday, August 15, 2006 1:55 PM by SharePoint, SharePoint and stuff

# SharePoint Server WarmUp

Haben wir immer schon mit großen Augen in den Litware Demomaschinen von Microsoft betrachtet: die Warmup...
Wednesday, August 16, 2006 3:00 AM by Sharepointers.de

# MOSS - Warmup Script

Hallo zusammen,
wer mal die Sharepoint Features von einem Virtual PC (Server) oder VMWare Image zeigen...
Wednesday, August 16, 2006 8:39 AM by Ron

# re: Warm Up your SharePoint Servers...

I set asside 1.4 GB to the VPC and the pages load fine.

 

Added by Joel:

Adding more RAM may make it load faster, but after a page has been compiled and ran it will be MUCH faster than the first access.  My post isn't really about the slowness of SharePoint, it's about overcoming initial request performance.

Friday, August 18, 2006 5:01 PM by Robin Majumdar

# re: Warm Up your SharePoint Servers...

This code appears to be only for MOSS - does the warmup principle apply to WSS/SPS 2003 installations as well ? If so, would it need just minor code mods... ?

Thanks!

Added by Joel:

Yes, it would work for WSS V2 or V3 and SPS 2003 or MOSS 2007.  Just remove page request lines that don't apply.  Feel free to add pages that are most often requested.

Monday, August 21, 2006 1:00 AM by Andrew Connell [MVP MCMS]

# SharePoint developer tips and tricks

Monday, August 28, 2006 6:48 PM by VB-tech weblog

# SharePoint Developer Tips and Tricks

Wednesday, September 20, 2006 9:52 AM by Michael Gannotti

# re: Warm Up your SharePoint Servers...

A co-worker emailed me this posting and I reposted and pointed back to you and your article. It is such a common thing. Thanks!
Thursday, September 21, 2006 10:05 AM by IIS Digest » Warm Up Your SharePoint Servers

# IIS Digest » Warm Up Your SharePoint Servers

Thursday, November 09, 2006 5:31 AM by The Mit's Blog

# IISReset, c'est bien trop long mais ...

Mais il y a une autre possibilité bien sur. Pas que je masterise la notion de IISReset mais j'avoue que

Friday, December 08, 2006 9:04 PM by Joel Oleson's SharePoint Land

# Caching in ISA 2006 vs. Caching in MOSS

I love caching in MOSS! Combine this with secure web publishing and offloaded performance for static

Wednesday, May 02, 2007 10:31 AM by Sezai's Blog

# Application Pool Recycle Utility for SharePoint Developers

This is a very useful application for MOSS 2007 developers, Application Pool Recycle Utility for SharePoint

Tuesday, July 17, 2007 12:52 PM by The Boiler Room - Mark Kruger, Microsoft SharePoint MVP

# 2007 MOSS Resource Links (Microsoft Office SharePoint Server)

2007 MOSS Resource Links (Microsoft Office SharePoint Server) Here is an assortment of various 2007 Microsoft

Tuesday, September 25, 2007 12:41 PM by Mark’s (we)Blog » Warming up SharePoint

# Mark’s (we)Blog » Warming up SharePoint

Thursday, September 27, 2007 3:48 AM by Mirrored Blogs

# Why is SharePoint slow when I first use it?

Following a recent forum thread on the subject I thought it would be useful post something for all of

Saturday, October 06, 2007 2:34 PM by SharePoint Architecture & Development

# My STSADM extension toolbox

Here's a listing of custom STSADM extensions myself and my coworkers have created. More details to come

Saturday, October 06, 2007 4:50 PM by MSDN Blog Postings » My STSADM extension toolbox

# MSDN Blog Postings » My STSADM extension toolbox

# MOSS2007: Speed Up First Access to your MOSS « rinonu writes…

Tuesday, December 11, 2007 10:55 PM by Mirrored Blogs

# Development--

Body: Application Development on MOSS 2007 & WSS V3 Beginning custom SharePoint development with

Sunday, January 20, 2008 7:15 PM by Richard's Rant

# Links for Monday 21 January 2008

Had a query today from a colleague at work on how to warm up a SharePoint site so that when a user first

Thursday, January 24, 2008 4:17 PM by spstuff's blog

# SharePoint Database Mirroring Script

Hello all, I've been meaning to get around to posting this script for the SharePoint community. I

# Airliners and Aircrafts » Joel Oleson’s Blog SharePoint Land : Warm Up your SharePoint Servers…

# SharePoint Warmup « Services, Windows, SharePoint, This, Microsoft, HTTP, URLs, Although « konfabulieren

Wednesday, July 23, 2008 1:13 PM by Why is SharePoint slow when I first use it? | 21apps

# Why is SharePoint slow when I first use it? | 21apps

Monday, August 04, 2008 9:20 AM by re up the warm up

# re up the warm up

Thursday, September 18, 2008 8:56 AM by The Bamboo Team Blog

# Warm Up Your Demo Servers

Ok, you've got a demo to do in a few minutes and you've just booted up your demo server. You

Thursday, September 18, 2008 10:36 AM by The Bamboo Team Blog

# Warm Up Your Demo Servers

Ok, you've got a demo to do in a few minutes and you've just booted up your demo server. You

Thursday, September 25, 2008 5:02 AM by [Sharepoint] Outils de préchauffe - ..::LoLoFx::..

# [Sharepoint] Outils de préchauffe - ..::LoLoFx::..

Thursday, September 25, 2008 5:02 AM by [Sharepoint] Outils de préchauffe - ..::LoLoFx::..

# [Sharepoint] Outils de préchauffe - ..::LoLoFx::..

Sunday, September 28, 2008 7:49 AM by Brain Litter

# SharePoint slow to load in the AM?

SharePoint slow to load in the AM? That first user, after the work processes gets recycled, gets to have that long ASP.NET compile pause. Joel Oleson has written a script to alleviate that pause (though isn't that when you get...

Thursday, October 02, 2008 2:47 PM by Precalentando MOSS | TipeSoft

# Precalentando MOSS | TipeSoft

Tuesday, November 18, 2008 11:53 AM by Dev

# re: Warm Up your SharePoint Servers...

When I am running the warmup script. I am getting below error message:

D:\Sharepoint_Warmup_Script\HttpRequest.vbs(69, 1) Microsoft VBScript runtime er

ror: ActiveX component can't create object: 'BillGrHighResTimer.BillGrHighResTim

er'

Any idea what can cause this?

Friday, December 19, 2008 2:19 AM by Christophe Fiessinger's Blog

# Warm up your Project Server and SharePoint VPC in seconds!

Yet another cool tool from CodePlex: SPWakeUp - Wake up your Sharepoint and WSS Sites if you want to

# Sharepoint : Script de pr??chargement » m??mo' ...

Sunday, January 18, 2009 11:54 AM by Performance issues | keyongtech

# Performance issues | keyongtech

# D?lais important pour le premier client qui se connecte au site | hilpers

Sunday, January 25, 2009 5:54 PM by The Trainer

# Warm up your SharePoint servers

I’ve been using these scripts at work and in my virtual PCs to warm up my SharePoint servers by forcing

# 2K3 - IIS - Aufruf der ersten Seite sehr langsam - MCSEboard.de MCSE Forum

Friday, February 27, 2009 11:46 AM by ccttu

# re: Warm Up your SharePoint Servers...

Joel:

Hey, would love to use this script, but get this error when trying to download?

XML Parsing Error: no element found

Location: http://blogs.msdn.com/joelo/attachment/697044.ashx

Line Number 1, Column 1:

# Rouslan Grabar writing on NET, SharePoint, SilverLight, WPF and other technology related topics » Blog Archive » Translated MSDN article - Creating Custom Timer Jobs in Windows SharePoint Services 3.0

Tuesday, April 21, 2009 9:48 AM by clisi

# re: Warm Up your SharePoint Servers...

Can anyone out there help with this? I have managed to download the files from another web site because the zip file on this page does not download.  I've edited the 2 files (Startup and Warmupserver) and it is not helping. I can't figure out what I'm doing wrong. If you can help, please email me and I will email the modified files to you.

Thanks.

Tuesday, April 21, 2009 9:57 AM by clisi

# re: Warm Up your SharePoint Servers...

By the way, I'm getting http 401 errors (unauthorized).  This is the issue I'm not sure how to resolve.

# SharePoint slow start - warm up script | Jeremy Taylor

Thursday, May 28, 2009 12:02 PM by Agusto Xaverius P Sipahutar

# Warm Up your SharePoint Servers

Kita tahu bahwa ASP.Net bila kita lakukan new deployment assembly baru atau server kita restart maka

# Joel Oleson s Blog SharePoint Land Warm Up your SharePoint Servers | Hair Growth Products

# Joel Oleson s Blog SharePoint Land Warm Up your SharePoint Servers | debt consolidator

Tuesday, June 23, 2009 11:12 PM by links for 2009-06-23 | Amano Jyaku.Info

# links for 2009-06-23 | Amano Jyaku.Info

# MOSS, Monitoring und Performanz - Teil 2 « Torsten Flegel

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker