What exact settings required in iis for asp.net pages to process it faster? - iis-7

I am having a simple blank page without any source code.The page also taking very long time to come.I am not able to understand the reason behind this.
The domain is getting a high requests.
What exact settings needs to be done in iis 7.0 so that it will be faster.
Please help.

ASP.NET pages always have an initial delay when the first request is made after the file has been created/edited/uploaded because the server needs to recompile them, however it shouldn't be more than 2-3 seconds in practice, and does not affect subsequent pageloads.
The only thing I can think of is an overloaded server. Assuming you're on a shared hosting package then I recommend you find another ISP. If not, then I'm afraid there's a lot more to it than just a "page pages load faster" switch hidden away.

Related

Diagnose website slow startup AJAX ASP.NET

I've a Ajax .net website which follows this structure :
Control (ascx) : TopMenu, LeftPanel, RightPanel, Footer, all are very simple controls and don't require any connection to database or server side code !
One div body (ajax)
Everytime the website starts, the 4 controls load first, then comes the Ajax body. The performance is pretty good in development environment.
But when i uploaded the precompiled site to the host, it always take quiet long for starting up, after the first load, the performance is good
What i can't understand is : as far as i know, the four ascx control will be rendered first, that means the page will be loaded to the client, after that is the ajax content. So what's causing the performance on start up ?
P/s :
i did set the key compilation=false in web.config
i compiled the site using Publish tool in VS 2010 (Release mode and not allow updatatable ... )
i have no images on the site, it's a very simple site
i've checked similar topics, and event posted a question not so long ago about
this, but still without success
my site: http://iketqua.net
From your site and running the Network Analysis on google chrome what is blocking the render of your site is a huge delay for make a lot of calculations on page load, there is a lot of time that takes to start get data.
Also the google analytic script, must be placed on bottom of your page, together with other external scripts for google plus, facebook like etc.
Also there are 2 fonts on this css, that can not be load, and this takes almost 3 seconds delay.
http://iketqua.net/Styles/Fonts/MyriadPro/font.css
(source: planethost.gr)
If you are referring to the very first request after deployment to production. I don't think there's anything you can do about it. ASP.NET first request will always be slow, even if it is a pre-compiled site because the server still needs to load resources on the server-side.
But, if you are talking about first load from the client-side perspective, by just running Chrome Developer Tools I can see that your site's home page is quite heavy (44 requests, ~4 seconds to load) which explains why the first load takes some time and sub-sequent requests are quicker...mainly, because most of those 44 requests get cached by the browser. Now, in your dev environment it happens quickly because there is no significant network latency or connection hops, once you move to production the network lantency and connection hops plays a big role in performance...that's why many sites use CDNs.
Suggestions
Make your site lighter. There's many things you can avoid. For example:
This background image (http://iketqua.net/img/header_bg.png) is useless because it is a plain color which you can easily achieve that using css. That'll translate to one request less
Bundling and minification tools to minify and merge style sheets and js files
Optimize your css. Take the time to review your css and clean it. I can't believe that such a simple page can be requesting 9 css files...probably most of them are coming from open source frameworks (jQuery UI, DatePick, etc)
I lack permissions to post this as a comment, but if it's fine in the development environment, it may be something as simple as ability of the host or the connection to the host.
After the first load, the performance is good
I'd be inclined to think this is due to the site being cached.

Quickiest way to determine why a site is sluggish?

I just picked up a client who's Wordpress web site takes anywhere between 8 to 22 seconds to START loading. The loading delay also occurs when using the Wordpress backend so I'd like to fix the loading issue first before starting my work (template re-design). What's the quickest yet efficient way to determine why this Wordpress site is taking so long to start loading?
Thanks in advance
P.S. - They currently have a caching plugin installed (WP Super Cache) which I assume the previous web developer installed to help with the loading issue but it only helps with the front-end and not the back-end.
Try to run some test like YSlow and Google Page Speed and read their results and suggestions.
Google Speed Online is helping me a lot with analysis of my websites.
http://pagespeed.googlelabs.com/
I use browsermob. They use real browsers to test the site load performance. Shows very nice graphs showing how long each and every request took. Also shows how many requests happen in parallel. As they use real browser, you can see how long it will take to load on a real browser. Then you can choose from which location you want to test. You can choose a UK location to test how fast your page loads from UK.
By the way, I am in no way related to browsermob. I just happen to be a satisfied user of this.
And it is free.
Your server is probably loading far too many modules and is thrashing the disks as it's run out of memory.
You need to both reduce how much memory each PHP instance consumes and limit how many PHP instances can run simultanouesly to ensure you don't use virtual memory for your PHP instances.
I've written a detailed answer to a very similar problem here on Stack Overflow:
How can I figure out why my Wordpress pages load so slowly?
Well, i have came across a similar situation, such things happen when your website is hosted on a GridHosting server, which means it changes according to the server load, but sometimes the things are just opposite the scenario, the best way to check why it is slow is to first ping the website at random interval , so in this way you will know if the distance is the cause or the packet dropping is the issue, secondly, you need to make sure your server's configurations is good, i.e; request your host about a RAW log of your website, in this way you can know what is it taking long for your server to response, and the least best method is to check and make sure that your DNS resolves in a good time, and try to use some free CDN services like CloudFlare.
Hope this helps.

slow of first page, running on windows/IIS

I'm more into the LAMP stack, but I've been asked to work on a site that is running Windows and IIS 2008. I'm a beginner with IIS, so please be patient with me on this, and please ask me to provide more information if that is needed to determine.
I read the answer here (Slow first page load on asp.net site), but it seems like if I go to the site with one browser it takes long to load the first page, then fast on all other pages, then if I open up another browser, it's the same thing, so it's not something that is saved on the server, but per session?
Is there a way to have the application running at all times?
Right now it is taking 12 to 15 seconds for the first page to load.
I have access to the WebControlCenter and FTP.
I would look in the Global.asax page and see if there is anything going on when a session is started. There usually is a method in there called Session_Start that is called whenever a session is started. Also, it might have to do with the site being configured in debug mode. You can change the web.config setting to false, which has a big impact on performance.
I'm familiar with the phenomenon described in the question you've linked to, but your what you're describing does seem a bit odd.
firstly- try Jeff's suggestion and see if indeed there's something at the beginning of the session which slows it down.
If not- try answering this-
1. is the first page always slow or only on first access to it?
2. what happens if you open another tab in the browser (not a different browser)?
3. it's possibel that the page contains some heavy resources (like images, script files etc.) which are only downloaded on the first access to the page. try tracing your http responses you get and see what their sizes are.
4. try to enable trace on your web page to see the events which are taking the longest time (on aspx you need to add 'Page Trace="true"' to the page declaration)
hope one of these helps...
Have you tried a http debugger here? Lots of things could be going on here, but the fact that you get different behavior by using different browsers indicates it is probably some particular resource that is overweight.

How do I take a .NET site down for maintenance?

I have an ASP.NET site that I'm going to have to take down to make some major structural updates to, and I was wondering how I should go about it from the client-side perspective. I have heard of an App_Offline.htm file or something like that, but I've never really gotten that to successfully work. Does anyone know how to do this?
EDIT
My app is running ASP.NET 4.0, for what it is worth.
Rather than messing with the app_offline silliness (among other reasons, you can't continue to see the site internally while performing maintenance), I created an additional "down for maintenance" site in IIS, which is normally stopped. It has the same IP, host headers, etc as the main site, but only has a default.aspx, an images folder and a stylesheet. That file contains the "This site will be down for maintenance until xx:xx PM CST" message.
When I'm ready to perform the update, I stop the main site and start the maintenance site, which then processes any requests it receives and, of course, returns the maintenance message.
When the maintenance is complete, stop the maintenance placeholder site, and restart your main site.
If you're using host headers, you can modify this approach so that the site remains internally accessible over your LAN/WAN while the maintenance site is handling external requests. A simple approach is to remove the host headers for <*>.yourdomain.com from the main site before starting the maintenance site, and ensure that the main site has an additional host header that is internally accessible (added to your local hosts file, for instance). When you start the maintenance site, it'll handle external requests while the primary site will handle requests to the internal-only header.
Alternatively (this seems complex, but saves you the trouble of adding and removing headers), create three sites:
Main site: Configured as in normal operation.
Maintenance site: Has same IP, host headers, etc as main site, but only contains default "down for maintenance" page and any images, css, etc that are required.
Internal test site: Duplicates the configuration of the main site and points to the same folders, but only has host headers,etc for an internal name that is not in the public DNS.
This way, you have only to stop the main site and start the other two in order to funnel external traffic to the "down for maintenance" site, while you can still see and tweak the primary site. This is helpful for that last few minutes of testing/bug fixing that tends to come up during a deployment.
Update
If you don't have access to the server or IIS Manager, you most likely won't be able to use any of that. Assuming that your access is limited to your own folder, your options seem to be either to deploy app_offline.htm to the root of the site (ASP.NET checks for that filename), or to just replace the whole site with a "down for maintenance" app. Perhaps someone else will chime in with alternatives.
The trick for IE is to push over the wire particular count of bytes otherwise IE shows not so friendly 404 error anyway. here is more details: http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx
If you have a good pre-release testing process and careful release procedures you probably won't be down for long.
In that case dropping a file called App_Offline.htm into your site root works fine. IIS will replace your site with it until you remove it. It's a painless way of making sure nothing's updating while you transition.
Mine just has a header with the site logo and a message that we'll be down for maintenance for up to twenty minutes. That's it. It took me about five minutes to write IIRC.
I would definitely recommend this for short sharp down periods of less than half an hour. Anything longer and you're probably looking at a major system change that warrants an approach like David Lively's.

IIS Log files for ASP.NET website

I am testing ASP.NET website and for that I have turned logging on at IIS6.0.
Following are the observations during testing:
Each link, png image, MS Chart and CSS file has been requested separately, one after another.
For request of say login page it is taking around 30-45 seconds to complete and in that page only 6 images are there and at log file it is observed that there are separate requests for each images one after another.
Can anybody help me to improve site performance and also I would like to know that is it possible that all requests would send to server parallel?
Yes it is possible to improve on the app speed by parallelizing the downloads !
I recommend going through google page-speed and yahoo's yslow, and read the practices that they propose. I felt it informative.
http://code.google.com/speed/page-speed/
http://developer.yahoo.com/yslow/help/index.html
Thanks
First of all, have you checked web-site Performance tab? Limits could've been set there. Also check that keep-alives are enabled (web site tab).
Then you should profile your server using System Monitor.
If everything mentioned is ok, you should check client side and what's between client and server.
What's happening is that the browser makes HTTP requests to the server for each object it finds on the page. You can eliminate those requests, or reduce how often they happen, by enabling client-side caching. For static files, you can configure that in IIS.
You can parallelize requests for images (not JS files) by assigning them to different domains; if they are all in a single domain, the browser will request only two at a time.
However, you question opens the door to a big subject. In an attempt to provide a detailed answer, I ended up writing a book on the subject, called Ultra-Fast ASP.NET. I cover the answer to the question from the OP in great detail in Chapter 2.

Resources