I am using Sqlserver express 2008 (64bit) on Windows Server 2012R2 with 56GB RAM.
I have a webapplication written in c# asp.net MVC5 hosted on IIS 8.5 64bit.
This application has been hosted as a 32 bit application as it has other 32 bit dependencies.
The data retrieval happens to be extremely slow, i.e. it takes approx 1.2 mins to run a simple query which returns 5 records. I have configured sql server min server memory to 8GB and max to 28 GB (if that matters, since its express edition I dont think it does matter)
The resource monitor shows the following statistics :
6,82,000 Virtual Memory
4,27,000 Working Virtual Memory
1467000 sharable memory
82000 Private memory
The problem is that the exact same setup works perfectly fine on same config with 8GB RAM.
I have 2 questions :
Could this be a SQLserver bottleneck? If yes then how to go ahead with the troubleshooting.
Does 32 bit application connecting to a 64bit instance of sqlserver have performance issues? Should I try a 32 bit instance instead.
This is where every SQL DBA lives is when a user says my application / query is running slow. Memory is most likely not your issue. Often it will be a parameter sniffing issue on the query, poor indexing on the table or some other issue. There are many ways of troubleshooting this and there are many scripts to run to find out what is going on. I would recommend Brent Ozar's toolkit available from GITHUB and use SP_BlitzFirst, SP_BlitzIndex and sp_BlitzCache.
Brent Ozar's First Responder Kit
Related
I would really like a surface pro, but I need to run SQL server.
I just wanted to know if the specs I posted in the question are sufficient enough to run SQL server smoothly?
Yes, that's way more than enough. SQL server itself doesn't need much resources, although it really depends on how much data you put in it and what kind of queries you run
OK… I’ve been tasked to figure out why an intranet site is running slow for a small to medium sized company (less than 200 people). After three days of looking on the web. I’ve decided to post what I’m looking at. Here is what I know:
Server: HP DL380 Gen9 (new)
OS: MS Server 2012 – running hyper-v
RAM: 32GB
Server 2012 was built to run at most 2 to 3 VMs at most (only running one VM at the moment)
16GB of RAM dedicated for the VHD (not dynamic memory)
Volume was created to house the VHD
The volume has a fixed 400GB VHD inside it.
Inside that VHD is server 2008r2 running SQL 2008r2 and hosting an iis7 intranet.
Here is what’s happening:
A page in the intranet is set to run a couple of stored procedures that do some checking against data in other tables as well as insert data (some sort of attendance db) after employee data is entered. The code looks like it creates and drops approximately 5 tables in the process of crunching the data. The page takes about 1min50secs to run on the newer server. I was able to get hold of the old server & run a speed test: 14 seconds.
I’m at a loss… a lot of sites say alter the code. However it was running quick before.
Old server is a 32bit 2003 server running SQL2000… new is obviously 64bit.
Any ideas?
You should find out where the slowness is coming from.
The bottleneck could be in SQL-Server, in IIS, in the code, on the network?
Find the SQL statements that are executed and run them directly in SQL server.
Run the code outside of IIS web pages
Run the code from a different server
Solved my own issue... just took a while for me to get back to this. Hopefully this will help others.
Turned on SQL Activity Monitor under tools\options => at startup => Open Object Explorer and Activity Monitor.
Opened Recent Expensive Queries. Right clicked on the top queries and selected Show Execution Plan. This showed a missing index for the db. Added index by clicking the plan info at the top. Added the index.
Hope this helps!
I'm managing middle sized company database. Recently we have massive system upgrade and switched to virtual machine environment. After deployment, we are having performance issues, Apparently SQL Server on the upgraded system works slower than the old configuration.
Here are the configurations:
Old Server: SQL Server 2008, 10gb Ram, Intel Xeon E5420 x2 (Physical Machine) runs on Windows Server 2008
New Server: SQL Server 2014, 64gb Ram, Intel E5 2660 x4 (virtual machine) runs on Windows Server 2012
Very basic IO performance comparison follows as:
new server:
old server:
Even with the most basic operation:
select * from table
from most used tables runs more amount of time to retrieve result. Also stored procedures run slower.
Example:
new server: 01:39 minute, 3285365 rows
old server: 01:00 minute, 3339738 rows
I have no idea what could cause this problem. Any help will be appreciated.
Edit:
Both servers has same sql configuration
tempdb and datadb is seperated
This probably isn't what you want to hear, but VMs are always slower than physical servers, because of the overhead of implementing the VM. Also the 2660 has MUCH less L2 cache than the old processor.
I'm not sure what to tell you except to make sure that the VM for the SQL Server, has as much RAM and cores allocated to it as you can spare, and that SQL Server is configured to actually use them.
Also, disk I/O is a big deal. Are the drives and controllers for both systems similar?
VMWare has a whitepaper on the subject, so at least you're not alone. 8-)
http://www.vmware.com/files/pdf/solutions/SQL_Server_on_VMware-Best_Practices_Guide.pdf
There are similar questions out there on this topic, such as When can I host IIS and SQL Server on the same machine? but I'm looking for more.
I'm looking for the most optimal way to setup IIS and SQL server on the same machine.
So far, I've got the following:
Use CPU affinity masks for both SQL and IIS/ASP to isolate the two on separate cores.
Configure SQL to reserve less RAM so that it leaves free memory for IIS/ASP.
Recycle app pool aggressively.
SQL database and log files on different disks.
So my questions are:
What ratio should CPU's be masked? Are we talking 1 cpu for web, and 3 for SQL, or split down the middle?
Same as above, what ratio? If I have 4GB of ram, Should I give SQL 3GB and IIS 1, or 2GB each?
I have three Hard Drives. How should I split everything up? I'm assuming 1st drive: OS & IIS, 2nd drive: SQL Installation & SQL Logs, 3rd drive: SQL Data
This is going to be highly application dependent.
The only thing from the first 4 suggestions I would use is number 4. Install SQL on the system drive and put the databases on D:, the log files on E:.
I wouldn't do any of the other things, especially aggressively recycling the application pool. You'll just eat up CPU time unnecessarily. Unless the application is leaking memory you gain nothing from aggressively recycling the app pool.
You should monitor your application and see what makes sense.
Source: I am head of Windows infrastructure for a web hosting company and have designed and implemented some of the biggest Microsoft based web infrastructures in the world.
I have a VPS with Windows Server 2008 R2, 1 GB RAM with Dual Processor Quad Core 2 CORES.
My sample application is running slower than my current website on shared hosting, when I asked the reason the says following reason:
"SQL Server Express tends to be slower compared to SQL Server Web edition. This is due to the limitations imposed in SQL Server Express which is basically meant for only development environment. We have observed significant amount of improvements with SQL Server Web edition for production web facing applications on VM's. Hence, this can be something that you might consider."
Is this logic just because they want to sale the Web edition database or there is really some performance benefit. I googled and I didn't find anything like that between different versions.
Any help on this from experts?
This is due to the limitations imposed
in SQL Server Express which is
basically meant for only development
environment.
That is absolutely wrong.
SQL Express is used in many, many, many production environments, where it can be a great tool.
SQL Express is not throttled in terms of the number of queries per second it can process. However, as others have said in their answers here, it is limited by RAM (1GB), DB size (4GB) and CPUs (1). If your DB is between 1GB and 4GB, you could easily notice a performance difference vs. SQL Web for scenarios where everything fits into memory on one, but not on the other.
Having said that, there are a bunch of other configuration / setup / design options that can have a much larger impact; the details depend on your data, schema, access patterns, etc.
hope that help:
[link text][1]http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx