The SQL Stack Design And Configurations

1,910 views

Published on

A basic overlook for some configurations when running SQL Server, SSRS and SSAS. Some configurations are also when the services are ran on the same stand alone server. There are also basic hardware considerations.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,910
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • OLTP:OLTP environments have thousands of incoming transactions.Small insert/update/delete queries.MAXDOP settings should be lowered, otherwise CPU contention can take place.
  • OLAP:Requires large amount of memory for complex data mining or cubes.Complex queries are used for extracting the data, either in T-SQL or MDX/DMX.Reports can contain hundreds of queries, depending on complexity.Use replication to get the data from your OLTP to your OLAP environment.SQL 11 “denali” introduces HADRON, which relies on SQL mirroring. However the standby database in this case is read-only, instead of in standby.
  • The SQL Engine requires resources depending how it is setup. In OLTP where short queries should be used, CPU’s will take preference due to the size of the query plans will be a lot smaller, and not need huge amounts of RAM. In a OLAP situation where multiple long running, and analytical queries will be executing the opposite is true. However, an OLAP environment will also hugely benefit from having multicore CPU’s ( this will also affect the MAXDOP of the server).The fastest disk you can afford, should be used to ensure that no IO bottlenecks occur, this holds true for both SQL and SSAS.If memory is a problem, or if the server has run out of DIMM slots; Fusion-IO drives should be put in place for paging where SSAS is concerned. It does not mitigate the IO bottleneck and speed sacrifices, but is however faster than any other local disk or SAN configuration.
  • Reporting Services is only an engine. To mitigate some of the performance issues, stored procedures can be used to offload the memory workload to SQL Server. You should optimally configure the server in preference to SQL Server as it will always consume more resources than SSRS.For SSRS 2008 and later, the engine makes use of an internal IIS component for Web Services. Where possible, it should instead be considered to host the engine on a web farm instead.This has a licensing impact however. When the SSRS, SSAS or SSIS engine components are installed on a server other than the main SQL Server, additional licensing fees are applicable.
  • Use separate service accounts for each service, to allow that the memory for those services are locked and cannot be paged out. This has a prerequisite of having enough memory allocated to the server for the desired workload.To alleviate additional performance issues, extra settings can be applied.Force SQL to only use a set amount of CPU’s.Configure min/max memory to ensure that it does not consume memory where it wants and to give control to the DBA.Resource governor can also be used, to mitigate performance risks between databases when some are more critical than others.For SSAS and SSRS, when residing on the same physical infrastructure, make use of the shared memory protocols. This will eliminate TCP round trips and unneeded waits on the requests.SSAS cubes can also be performance tested in Visual Studio to give you an indication of the time it will take to compile the cubes.
  • Stored procedures should be used, as it will move all the query plans into the buffer cache for SQL, this is more robust than open or ad hoc queries. This also allows the DBA or support to test all procedures to ensure the code is optimized( you are running on a shared environment are you not).Lock pages will ensure that when memory is used by SSRS, that it will not page out and affect the response time of SSRS.To reserve memory for SSRS, ensure that all the required settings are set for SQL and SSAS, as there are none available for SSRS to specifically set it’s paramaters.
  • SQL should be hosted on it’s own node to ensure that the resources are not consumed by the BI components.SSAS and SSRS can share on the same node IF he incoming load is not too big, and the servers are spec’d to handle it.When running SQL,SSAS and SSRS on the same cluster, if there is no passive node in the cluster to accommodate a failover; then the cluster “looses” it’s high availability as the combined resource consumption of SQL,SSAS and SSRS might be overwhelming to remaining node.SSRS is not cluster aware, but KB970759 gives an example to allow it to fail over in a clustered situation.
  • The SQL Stack Design And Configurations

    1. 1. The SQL Stack -Design and Configuration for High Availability<br />Presented by: Stephan Lawson<br />Level 100<br />
    2. 2. Bio<br />SQL DBA at Nedbank Ltd.<br />Managing large scale OLTP and OLAP environments.<br />Performance Tuning & Optimization.<br />Troubleshooting SQL Server, SSRS and SSIS.<br />Follow me on Twitter<br />@SQLArcher<br />Blogger at lessthandot.com<br />SQLArcher<br />
    3. 3. Overview<br />The Environment<br />OLTP and OLAP<br />Considering Configurations<br />Stand alone servers<br />Clusters<br />SQL Server<br />Reporting Services<br />Analysis Services<br />Summary<br />Q&A<br />
    4. 4. !<br />The Environment<br />
    5. 5. OLTP and OLAP<br />Don’t access your OLTP directly!!!<br />Spec your OLTP correctly, RAM, CPU and Disk.<br />CPU intensive<br />Short sub-second queries<br />Fast disk throughput<br />Benchmark<br />You NEED to know when your environment is taking a hit when it shouldn’t.<br />
    6. 6. OLTP and OLAP (continued)<br />OLAP is where the magic of BI takes place.<br />Spec your servers to cater for the incoming load.<br />Memory intensive.<br />Long queries.<br />Huge disk consumption<br />Get your OLTP data here.<br />Replication<br />Transactional replication for mission critical systems.<br />Snapshot replication for important, but not critical data.<br />HADRON<br />New in SQL 11 codenamed Denali<br />Uses mirroring with a readable secondary database.<br />
    7. 7. !<br />Configurations<br />
    8. 8. Stand Alone Servers<br />When the budget hits…<br />
    9. 9. Stand Alone Servers<br />All the SQL components are resource intensive in different ways.<br />SQL Server<br />CPU (OLTP) and RAM (OLAP).<br />Fast and redundant disk, either RAID 5 or 10<br />Analysis Services<br />SSAS prefers the cubes in RAM.<br />Fusion-IO for paging.<br />
    10. 10. Stand Alone Servers (continued)<br />Reporting Services<br />Use stored procedures to offload some of the CPU and RAM overhead to SQL Server.<br />Reserve CPU and RAM for SSRS ( 2008 uses IIS internally).<br />
    11. 11. Stand Alone Servers (continued)<br />Additional settings for performance.<br />Separate service accounts.<br />Lock pages in memory.<br />Service specific settings.<br />SQL Server<br />CPU Affinity.<br />Min/Max Memory.<br />Resource governor.<br />Analysis Services<br />Min/Max Memory.<br />Enable shared memory.<br />Max CPU Usage.<br />Performance test all cubes in Visual Studio.<br />
    12. 12. Stand Alone Servers (continued)<br />Reporting Services<br />Use stored procedures for reports.<br />Lock pages in memory for service account.<br />Reserve CPU and Memory for SSRS.<br />
    13. 13. Stand Alone Servers Diagram<br />
    14. 14. Clusters<br />When a company thinks this solves everything…<br />
    15. 15. Clusters<br />Clusters are for High Availabilitynot a sudden onset of performance.<br />Clusters as “SQL Solutions” would be:<br />SQL on node 1.<br />BI separate either sharing node 2, or a dedicated node.<br />Without passive nodes, the cluster looses “High” availability.<br />SSRS is not cluster aware.<br />Load balancing is required to scale out SSRS effectively.<br />MS KB970759 for a workaround.<br />
    16. 16. Clusters Diagram<br />
    17. 17. !<br />Summary<br />
    18. 18. Closing notes<br />SQL Server and Analysis Services both allow for settings to configure and in some cases optimize for performance when running on the same hardware.<br />Stand alone servers can be used, when configured correctly without major performance impacts.<br />Clusters are not the answer for any performance issues, they require diligent configurations for their purpose.<br />Also, keep in mind when loading SSAS,SSRS and SSIS on separate servers other than SQL Server requires additional licensing!!!<br />
    19. 19. !<br />Q & A<br />
    20. 20. Thanks<br />Enjoy the rest of SQL Saturday and the sessions.<br />Please complete the speaker evaluation forms.<br />Go performance tune your systems.<br />

    ×