I have statistical math functions that use intense sql queries and run in an sql assembly. I just increased the RAM on my db server (IIS 6, SQL Server 2005) but my queries still suck up 100% of my CPU for the 5 minutes I allow for the assemblies to run. Is there any way to allow the assemblies to cap their CPU? At 100% the server becomes unresponsive. Any sql tuning would help too.
SQLServer 2008 has a resource governor that allows you to throttle the CPU and/or I/O based on the db username that is used for a given connection. If upgrading to SQL Server 2008 is an option for you, your stats assembly could use a dedicated database username that allows it to consume 100% of the CPU unless another db connection needs CPU, then it yields to the other processes.
This works very well. We have queries and reports that do complex statistical analysis of thousands of data points. It too is CPU intensive. Before we upgraded to SQL Server 2008, we have all sorts of performance issues. Now everything runs smooth. The other new features of 2008 are nice, but the resource governor is the real reason we upgraded.
Related
Currently, I have a window application with using SQL 2008 R2.
This application is used by 200 users at the same time.
The database's size is almost 20gb.
The db server uses 16gb RAM, 200gb HDD.
And server is slow now, the CPU is over 80%, RAM was configured 14gb limit.
Does anyone have a tool or best practice to find out why the server is slow down?
Thanks.
We have around 20 Different physical servers in which SQL Server has been installed and configured( various versions MS SQL servers)
Need to monitor the complete SQL servers using one tool Which includes Database Performance, wait time, expensive queries currently executing, Log size utilization, disk space utilization ,Monitor CPU, memory and disk space utilization of the SQL Servers,Get complete details about SQL Server sessions, buffer, memory, locks and latches
If there is any Microsoft product available then preferred or possible other tools.
Please suggest
Looks like a lot of requirements. FYI, there is no Microsoft tool to manage On-Premise MS SQL Server instances. But, you can create your own utility using SQL scripts or SSIS packages.
I have a classic ASP application with SQL Server Express that includes a couple of maintenance scripts that take potentially a few minutes to run. On the old Windows Server 2003 and 2008 installations, SQL Server Express would be capped at 50% of CPU during a long-running script, which was fine.
Recently I got a new machine with Windows 2012 Server, and on this one, SQL Server Express is capped at only 10% of CPU in long-running scripts. As a result, the new machine is marginally slower at running the scripts, despite being much more powerful. Is there a way to control and increase the CPU quota for SQL Server Express in this situation, to perhaps 25%?
I realize that SQL Server Express is limited to using 4 cores, but my new machine is only six cores, and the theoretical limit would seem to be 67% from this factor.
Where would this parameter be managed? Would it be a Windows setting, or a SQL Server Express setting, or an IIS setting that governs the CPU quota for a single script?
A couple of possibilities I think I have ruled out:
IIS allows setting a limit on the CPU usage by an application pool, but this is not enabled by default, and was not enabled on my server.
Windows has a utility called "Windows Server Resource Manager" but
this also is not installed on my server. In any case, it would only
act when total CPU usage was above 70%, and I notice the apparent
limitation on SQL Server Express even when the CPU is otherwise idle.
Well, it is not capped at a certain percentage. It is ONE CORE ONLY. Want more - get another version (i.e. not express).
I realize that SQLExpress is limited to using 4 cores, but my new
machine is only six cores, and the theoretical limit would seem to be
67% from this factor.
Aha. Interesting.Where did you pick up that "knowledge"? It has never been that.
We are working for a client with an asp.net/SQL server application which has been using a SQL Server 2005 system till now. The client has decided to upgrade the database to SQL Server 2008 R2 and has procured a powerful server machine with 16 processors with enough RAM and installed Windows Server 2008 64 bit on the system. Now we are tasked with the installation of SQL Server 2008 on the system followed by migration of the existing DB from the SQL 2005 box. Now I am not a SQL Server DBA nor am I a System Administrator by role. Hence, in spite of reading up a lot of the literature on the net, I am not quite able to make sense of it all or put it in the right order of execution. Can somebody explain me the following items, preferably in terms of bullet lists:
What are the points of consideration during installation of SQL Server 2008, specifically in terms of
Configuring memory usage
Configuring the SQL Server to take advantage of the multiple processors available
Other factors to configure to enable SQL Server 2008 features for performance and scalability
Other points, if any, for configuring the Windows Server 2008 with respect to SQL Server 2008
Note: We will only use the Database Engine services in SQL Server. The applications does not use SSIS, SSRS, etc.
SQL Server will take advantage of whatever processors are available. Processors will be shared between sessions - if all of the work is being done by a single session, then it will all occur on the same processor (to the best of my knowledge - this requires citation).
Memory usage is dynamic by default, meaning that there is no restrication on memory usage. You can limit the memory usage used by the server (right-click on the connection in SSMS and select properties) if needed. This is generally used if the instance is part of a server performing other tasks, such as running other database instances, web service tasks, etc.
SQL server is pretty good it sorting itself out according to its environment. If you are in a position that you need to create a server farm and distribute data and processing between different machines, this is a whole new topic, discussed at length on MSDN and the StackExchange forums.
I have both SQL Server and SQL Server Express installed on my desktop PC, and have the AdventureWorks database installed out-of-the-box separately for each.
When I run the same application against the AW database on SQL Server Express, each query takes more than twice as long to complete. These are simple queries - not particularly demanding. None of the processor cores are under any significant load.
This has surprised me. I would expect that the (commercial) SQL Server would run faster in an enterprise environment with thousands of users: I would not expect to see any difference in performance for a single-user running a very simple set of queries on a local database.
Has anyone else had a similar experience, or can shed any light on what might be going on here? Thanks.
SQL Server Express is limited to use a single CPU and 1GB RAM, so that could be causing the queries to run slower than the paid editions.