Slow download performance using IE10 and IIS 7.5 with SSL certificate installed

I have written a C# and ASP.net application.  The application is pretty straight forward and nothing fancy.  I use LINQ to perform my data queries that return data to mostly forms that use Infragistics Webgrids.  The application as a whole runs great.  I can see no problems with performance issues.

The Problem:
As a feature of the application, I allow users to upload files from their desktop and store them on the server.  More specifically, I store these files as a varbinary(max).  When a user selects a row in the grid with one of these attached files, the user is presented with a button to view the file.  The file types are primarily .jpg or .pdf.  In addition I have a second table where I store records with rich text data.  I store this type of data in a field type of nvarchar(max).  The contents of this file is primarily HTML type data.  

When the user clicks the button to view this data, it takes about 3 to 5 minutes to appear on the users screen.  When I view the performance monitor on the server, it typically show 1 to 3 percent utilization on the processor and the disk are almost idle.  I am trying to figure out what to watch on the SQL server side to see where the bottleneck is but I not sure what performance counters to watch.

One additional piece of information..... If I reboot the SQL server, the problem goes away.  When the user clicks the button to view the document, it is almost instantly displayed on the screen.  At this time, I have not determined exactly how long it takes for the problem to arise.

Any help in diagnosing this problem is greatly appreciated.
kwh3856OwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kwh3856OwnerAuthor Commented:
Additional information... It takes less than 30 minutes after a reboot for the problem to appear.

Also, I have tried view 3 different records and the time is as follows

First Record to view (110.24 Seconds)    --- Used IE10 Developer Tools Network Sniff
Second Record to view (109.73 Seconds)
Third Record to view (109.85 Seconds)

It's very interesting that they are almost the exact same time delay.
0
Eugene ZCommented:
please post details about your server, topology.
including OS, Sql server version edition , CPU, Memory, NiC, etc..
What is max\min sql server memory settings?

are you using filestream, store in DB? -- ok, I see "varbinary(max). in DB"
how far the users from server?
How often do you run DB mains?
How big these Files?
How big your db?
How fast the apps used sql code runs - if you run directly on the sql server via SSMS?

you may need to optimize code, add indexes, maybe add more RAM,CPU
0
Davis McCarnOwnerCommented:
SQL Server likes to cache almost everything in ram until it exhausts available memory which then creates a huge performance hit because it starts fighting with Windoze about releasing some of it to other processes.
Here is an article on monitoring its usage: http://www.mssqltips.com/sqlservertip/2304/how-to-identify-microsoft-sql-server-memory-bottlenecks/
Here is how to reign it in: http://serverfault.com/questions/247794/bad-performance-when-sql-server-hits-99-memory-usage
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Aaron TomoskySD-WAN SimplifiedCommented:
If suggest not storing files in SQL. Store the relative path and filename and pull the file from the filesystem. This will immediately solve this problem as well as the future problems of database size and portability.
0
kwh3856OwnerAuthor Commented:
1) How far are the users from the server?  I remote desktop into the actual web server and ran the web application from IIS manager.  I experienced the same problem.  There were no users on the web server or db server.  This application has not been released yet so it does not have any active users.

2) I do not run any DB maintenance procedures.

3) The largest file is probably a 200K .pdf document.

4.  The entire database is 20 mega bytes.  The table with the stored fileds only has 28 rows in the table.

5.  I have configured any indexes for the tables.

6.  The processor is a 2.79 GHz processor

7.  The memory is 12 Gigabytes

8.  The OS is Windows 2008 R2

9.  This is a guest machine running on VMware ESX 4.1 ..... I think

I hope this helps
0
kwh3856OwnerAuthor Commented:
5.... I have NOT configured any indexes for the table.
0
Eugene ZCommented:
1)  is IIS and sql server on the same box?
if not - it can be Web server issue (Memory\CPU \NIC)

check CPU\Memory of the web server

on sql server:

run sp_configure on sql
and select @@version
and post here to see min\max memory for sql

--
check sql error log \ even viewer
--


did you try to run t-sql used in your web from SSMS?
was it fast?
0
kwh3856OwnerAuthor Commented:
Tried setting Use AWE to allocate memory to yes
Set Minum server memory to 4000
Set Maximum server memory to 10000

Saved changes and rebooted server.

Tested application after server had been online for 3 minutes and had the same problem.
0
kwh3856OwnerAuthor Commented:
EugeneZ,

The web server is running on another guest machine.  I will try the stuff you mentioned and let you know.

Thanks
Kenny
0
kwh3856OwnerAuthor Commented:
Web Server Specs

Processor 2.79 Ghz...  Running at 0% utilization
Memory is 2 Gig (36% memory showing used)
OS is Windows 2008 R2
0
kwh3856OwnerAuthor Commented:
Ok... this is weird.  I just re logged into my app from the Internet and everything is working fine.  Maybe it takes a little bit for the SQL changes I made to take a hold.  I will test a little longer and see if it stays working...
0
Mark WillsTopic AdvisorCommented:
LOB + Performance Issues... This is an age old problem... and a lot of different ideas.

Big impacts on memory and how data is actually stored.  LINQ does add another dimension beyond this initial discussion.

So, you will probably want to monitor memory, wait states, and IO. Mainly buffer cache hit and page flushes. But there is a lot you need to consider before that. Especially with LOB data.

Do you have any opportunity to change some of your designs ? Assuming you might, then there are a few things to consider before we get ahead of ourselves with just performance.

Most of the discussions about LOB data depends on size. There are problems when trying to store LOB in rows when it is > 8K.

You basically need to tell SQL how to manage otherwise it is going to need to examine and decide what has happened and if needed access a rather slow / unwieldy "heap" to find that data.

One thing you can do is :
EXEC sp_tableoption 'your_table_name', 'large value types out of row', 1;

Open in new window

That is explained in : http://technet.microsoft.com/en-us/library/ms173530(v=sql.105).aspx

Now the problem with out of row for LOB data is an extra IO (especially if relatively small - that magic 8K size), but what it also allows is specifying where that filegroup can exist, and the table structure can then support clustering etc so your access to the pointer for that out of row LOB data can be significantly improved by caching the table sans LOB data etc...

Before we get too far ahead... It is really important to manage memory in SQL 2008 +++ 64 bit (it wants to use everything it can). So you should be also looking at setting max memory. Have a read of : http://sqlserverperformance.wordpress.com/2009/10/29/suggested-max-memory-settings-for-sql-server-20052008/

Now, you also have access to FILESTREAM which is a datatype designed specifically for handling LOB data by storing the pointer in the data table to an external file.

There is a great whitepaper from Paul Randal + mates for download via : http://msdn.microsoft.com/library/hh461480 

In SQL2012 there is also FileTables built over the top of FILESTREAM (not sure if it is available to you - what version of SQL do you have ?) : http://technet.microsoft.com/en-us/library/gg471497.aspx

In the meantime, consider loading the SQL 2008 Performance Studio : http://blogs.technet.com/b/rob/archive/2008/06/20/sql-server-2008-performance-studio.aspx or maybe the "free" 3rd party tools such as : http://www.idera.com/productssolutions/freetools

To get the most out of any discussions moving forward, you should familiarise yourself a little more with : http://technet.microsoft.com/en-us/library/ms187830(v=sql.105).aspx

So...

1) If you could get back with "average size" of LOB entry
2) what options / setting for max memory or other SQL settings you have applied
3) If designs can be "enhanced"
4) some of those other questions raised by Experts above
5) do you have experience with performance tuning and what the numbers actually mean
0
kwh3856OwnerAuthor Commented:
New Information:
I opened Chrome on one screen and logged in.

I opened Microsoft Internet Explorer 10 on another screen and logged in.

I clicked to open the document on both IE and Chrome about the same time.  Chrome opened it almost instantly.  IE 10....... well it just loaded as I finished typing this. What setting in IE 10 could be causing this?
0
Mark WillsTopic AdvisorCommented:
Dang... Problems with posting a big entry, getting logged out, having to recreate the post, is that a LOT can happen in between times...

Not sure that it changes my post above too much, just double check what the max size of your LOB data might be.

If always under (say) 256K then having in row LOB data should be fine. But would be inclined to fine tune the data type.

If you use varchar(MAX) - then the (MAX) changes the ground rules a little and SQL behaves differently.

Anyway, check out my post above...
0
Mark WillsTopic AdvisorCommented:
I think IE10 performance issues is a different subject altogether...
0
Eugene ZCommented:
check this one

Fix common IE problems: Update your docmode for web standards
http://msdn.microsoft.com/en-us/hh779632.aspx
0
kwh3856OwnerAuthor Commented:
Not sure if this is what it is supposed to look like.
IE-10-Doc-Standards.jpg
0
kwh3856OwnerAuthor Commented:
Mark,
Thanks for all the info.. I am trying to digest it all right now.  I will let you know how it goes.

Thanks
Kenny
0
kwh3856OwnerAuthor Commented:
New Information:
 The first time the user tries to view the document.  The document is immediately displayed.  After that, it takes over 1 minutes and 30 seconds to view the document.  This behavior is only exhibited in IE 10.
0
Eugene ZCommented:
cool!
at least it is not sql server anymore
0
kwh3856OwnerAuthor Commented:
Yes, I am 98% sure it is Internet Explorer.  I have been working all day to see if I can find that one setting that may be causing it but no luck yet.  I may just have to tell everyone that it only works in Chrome or Firefox.  I am trying IE in previous browser compatibility modes but still same problem.
0
kwh3856OwnerAuthor Commented:
My gut tells me it has something to do with caching but I have told it to request a page every time from the website but still no luck.  I also tried disable DOM control and still no luck.
0
Mark WillsTopic AdvisorCommented:
Might be worthwhile running "fixit" and seeing that that says / does : http://support.microsoft.com/mats/ie_performance_and_safety

Also check uninstalling IE10 (on a test machine that is slow) and try IE9 instead... http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/ie10-in-w7-found-a-compatibility-problem-and-hangs/4c6928c7-ac34-4a8d-812b-683efdaf4b88?msgId=a77f7bff-62b3-4146-a2c9-1dc15b5f8744

There is a known error IE10 + Win 7 + some hardware, but that was originally unable to install IE10. Have a look at : http://support.microsoft.com/kb/2823483 there is a list of hardware and if it is one of yours, then it might be a contributing factor (in which case, supports the argument to revert to IE9).

Then ask a new question in the Internet Explorer and/or Web Development and/or IIS (you can choose three) Topic Areas

Glad it is not SQL, but still, would follow up on some of the recommendations...
0
kwh3856OwnerAuthor Commented:
Ok... It definitely seems to be related to a DOM event.  Not sure how to diagnose from here.
DOM-Content-Event.jpg
0
kwh3856OwnerAuthor Commented:
New Information:

When I open Visual Studio and run the application with Internet Explorer the problem does not exist.  IE 10 opens the document almost instantly.  The only difference now is that Visual Studio is running a local web server from my workstation and then pulling the data from the SQL Database via a VPN connection.  You would almost think it would be slower this way due to the VPN.  But,  it runs extremely fast.  This leads me to believe that there may be a setting in web server IIS 7.0 that is affecting the issue with IE 10.  Does anyone have any ideas?
0
Eugene ZCommented:
yes, it is not sql server
...
check this one

DOMContentLoaded
http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/




You Don't Need the DOM Ready Event
http://thanpol.as/javascript/you-dont-need-dom-ready/
0
kwh3856OwnerAuthor Commented:
The version of Visual Studio I am using is Ultimate 2012
0
Mark WillsTopic AdvisorCommented:
Well, not sure on how you have coded your app...

You will benefit from having slightly different experts looking at your problem now...

I really do suggest you open a new question with your new information in the appropriate Topic Areas...
0
kwh3856OwnerAuthor Commented:
After more testing, I believe the problem is related to SSL running on the IIS server.  I realized the problem did not exist until I installed the GoDaddy SSL Certificate on the server.  Also, we discovered that if you use IE 9 and add the website to the Trusted Sites list the problem will go away.  When you do this in IE 10, the problem still exist.  Does anyone have any ideas?
0
Mark WillsTopic AdvisorCommented:
Well, according to GoDaddy it is supposed to be compatible : http://support.godaddy.com/help/article/1139/which-browsers-and-devices-are-your-ssl-certificates-compatible-with

But there is also a support issue about rendering and Win 7 + IE10 :
http://support.godaddy.com/groups/quick-shopping-cart/forum/topic/ie10-rendering-mode-issue/  (seems unsolved at this point, but shows you are not alone).

Then I came across this issue - turned out to be an ISA issue (read last comment) : http://community.spiceworks.com/topic/360632-ssl-ok-in-chrome-not-in-ie10 and that got me thinking that it might not be IE10 per se, but the increased security.

So, would start the long process of going back and checking that the SSL cert was installed correctly everywhere it is supposed to be and adding to "trusted sites" everywhere and checking that firewalls are also accommodating.

*laughing* still reckon you might get more help from experts that specialise in this type of thing...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kwh3856OwnerAuthor Commented:
Mark and Eugene,
I am still having the problem but I wanted to say thank you for your assistance.  One interesting thing I found was that the problem does not exist in Windows 8 and Internet Explorer.  Somehow its tied to Windows 7 and Internet Explorer.  I will post up the answer if I ever get one.  Thanks so much for trying to help me.
0
Mark WillsTopic AdvisorCommented:
If you can find the real answer, would love to hear about it. I do have a couple of godaddy sites and have not had the same problem in testing, but that isn't to say that some who access will have a problem...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.