Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Friday, March 30, 2012

performance tuning on high volume server

I am looking to improve the performance of my sql server databases.

I currently have a dual location system, the database server setup is basically a quad xeon with 4gb at my office and a double xeon with 4gb at a remote webhosting location. There are separate application/web/intranet servers at each site. The two databases servers are replicated with the local server publishing to the remote server.

The relational database holds circa 26 million records, growing by a volume of 10,000 per day, there are approximately 50,000 queries performed per day.

My theory is that the replication of the two databases is causing a slowdown; despite fast network connections (averaging 200ms between servers) the replication seems to place a large load on the local server. Would it be sensible to replicate to a second local server and then replicate to the remote server, placing any burden on the second server?

I am planning to upgrade the local server to a high capacity 4+ cpu 64bit server, my problem is that although I have noticed a slow down in performance over time, I am unsure how to go about measuring and quantifying this in order to diagnose the bottlenecks and ensure that investing in a new server would be worthwhile. Where would one be best advised to start this project?

Hi Gavin. What type of replication scheme have you implemented? Transactional/merge? Peer-to-peer, read-only subscriber, queud/immediate updating subscriber, etc.? Where to start on the research would have a lot to do with what type of topology you are using.

How are you getting to the conclusion that replication is responsible for the slowdown?

|||

Hi - it is a transactional type replication.

Chad Boyd MSFT wrote:

How are you getting to the conclusion that replication is responsible for the slowdown?

When turing off replication, the performance was improved. It seems that the bandwidth between servers would explain this.

What can I tell you about the topology?

|||

Hi Gavin. Is it a bi-directional replication setup? i.e. are the subscribers set to replicate updates back to the publisher, or are the subscribers simply read-only? What type of link exists between the sites (T1, T3, partial T, etc.)?

From the general sounds of things, you don't have an extremely busy write server, so a decent link between the 2 sites sounds sufficient for what you have, which is why it would be surprising to hear that the bottleneck is the network bandwidth...of course, it most certainly could be depending on the types of transactions you are seeing, this is just me thinking out loud.

You mentioned when turning off replication that performance improved, do you mean that end-users received responses to queries faster? Or you noticed particular counters drop significantly? Or possibly blocking/locking issues disipated?

I'd be surprised if the link is the bottleneck, since when you say performance improved I'm going to assume you mean end-users started seeing faster response times to requests...if that's the case, it would seem that there is something occuring on the box itself that is slowing down the response times (of course, that could be the replication agent keeping a lock on something because it is waiting for a response from the subscriber across a slow link, but in transactional replication, that's not as common as with merge, where the agents are querying tables directly...in transactional replication, the log is read directly).

Anything you can post that explains what you are seeing in terms of what is showing you performance is improved? Counters, query response times, etc.?

|||

I am also working with large volumes of data average of 12million records per table and a total of 23million record.No cluster or Indexes, this is because the data is to bulk to change.While running queries i find that my application hangs even if i set the ODBC timeout to 0. Unlike you i working with a normal X86 2.86 GHZ and 504MB RAM.

Please advice

|||

thank you for all your replies and assistance so far.

Chad - to answer your questions the subscribers are all read-only and there is a T1 link between sites.

As I am a developer and not a database specialist I have decided that I need to bring in some outsourced consultancy. Before I do this I would like to do some research so that I can learn as much as possible I would like to be up to speed on this and have as much background knowledge as possible.

I think that the first thing that I should do is to measure the facts as much as possible. Could you please advise me as to what tools and applications I can utilise to gather statistical facts?

What can I learn from my log files? What monitoring tools can I install?

performance tuning on high volume server

I am looking to improve the performance of my sql server databases.

I currently have a dual location system, the database server setup is basically a quad xeon with 4gb at my office and a double xeon with 4gb at a remote webhosting location. There are separate application/web/intranet servers at each site. The two databases servers are replicated with the local server publishing to the remote server.

The relational database holds circa 26 million records, growing by a volume of 10,000 per day, there are approximately 50,000 queries performed per day.

My theory is that the replication of the two databases is causing a slowdown; despite fast network connections (averaging 200ms between servers) the replication seems to place a large load on the local server. Would it be sensible to replicate to a second local server and then replicate to the remote server, placing any burden on the second server?

I am planning to upgrade the local server to a high capacity 4+ cpu 64bit server, my problem is that although I have noticed a slow down in performance over time, I am unsure how to go about measuring and quantifying this in order to diagnose the bottlenecks and ensure that investing in a new server would be worthwhile. Where would one be best advised to start this project?

Hi Gavin. What type of replication scheme have you implemented? Transactional/merge? Peer-to-peer, read-only subscriber, queud/immediate updating subscriber, etc.? Where to start on the research would have a lot to do with what type of topology you are using.

How are you getting to the conclusion that replication is responsible for the slowdown?

|||

Hi - it is a transactional type replication.

Chad Boyd MSFT wrote:

How are you getting to the conclusion that replication is responsible for the slowdown?

When turing off replication, the performance was improved. It seems that the bandwidth between servers would explain this.

What can I tell you about the topology?

|||

Hi Gavin. Is it a bi-directional replication setup? i.e. are the subscribers set to replicate updates back to the publisher, or are the subscribers simply read-only? What type of link exists between the sites (T1, T3, partial T, etc.)?

From the general sounds of things, you don't have an extremely busy write server, so a decent link between the 2 sites sounds sufficient for what you have, which is why it would be surprising to hear that the bottleneck is the network bandwidth...of course, it most certainly could be depending on the types of transactions you are seeing, this is just me thinking out loud.

You mentioned when turning off replication that performance improved, do you mean that end-users received responses to queries faster? Or you noticed particular counters drop significantly? Or possibly blocking/locking issues disipated?

I'd be surprised if the link is the bottleneck, since when you say performance improved I'm going to assume you mean end-users started seeing faster response times to requests...if that's the case, it would seem that there is something occuring on the box itself that is slowing down the response times (of course, that could be the replication agent keeping a lock on something because it is waiting for a response from the subscriber across a slow link, but in transactional replication, that's not as common as with merge, where the agents are querying tables directly...in transactional replication, the log is read directly).

Anything you can post that explains what you are seeing in terms of what is showing you performance is improved? Counters, query response times, etc.?

|||

I am also working with large volumes of data average of 12million records per table and a total of 23million record.No cluster or Indexes, this is because the data is to bulk to change.While running queries i find that my application hangs even if i set the ODBC timeout to 0. Unlike you i working with a normal X86 2.86 GHZ and 504MB RAM.

Please advice

|||

thank you for all your replies and assistance so far.

Chad - to answer your questions the subscribers are all read-only and there is a T1 link between sites.

As I am a developer and not a database specialist I have decided that I need to bring in some outsourced consultancy. Before I do this I would like to do some research so that I can learn as much as possible I would like to be up to speed on this and have as much background knowledge as possible.

I think that the first thing that I should do is to measure the facts as much as possible. Could you please advise me as to what tools and applications I can utilise to gather statistical facts?

What can I learn from my log files? What monitoring tools can I install?

Tuesday, March 20, 2012

Performance problem MDX, dependent on location in the code

Hello!

I have MDX in my cube in the tab Calculation. The same MDX perform very differently dependent on where it is located in the code.

Example:

This is in the beginning:

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[5111 Sales of Goods33] AS

Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]})

,FONT_FLAGS = '1';

And this is in the middle:

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[5111 Sales of Goods22] AS Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]})

,FONT_FLAGS = '1';

[5111 Sales of Goods22]is very slow.

[5111 Sales of Goods33] is a little bit slower than select [Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]from the hiearki.

Why is it like this?

How do I solve my performance problem?

Look forward to any solution.

Best regards,

Tina

Hello!

I give a new example (This is all that exists in my MDX):

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[5111 Sales of Goods] AS

Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]}

)

,FONT_FLAGS = '1';

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[520 Subtotal ; Production] AS

Aggregate({ [Account].[AccountOGIS].[OGIS3Digit].&[T]&[5]&[52]&[520]}

* {[CostCenter].[OGIS CostCenter Id Name].&[1000]})

, FONT_FLAGS = '1';

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[5112 Income Service] AS

Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5112]})

,FONT_FLAGS = '1';

[5111 Sales of Goods] is fast.

[520 Subtotal ; Production] and [5112 Income Service] is slow.

[5112 Income Service] becomes slow when it is located after [520 Subtotal ; Production].

[520 Subtotal ; Production] seems to bee slow due to it use two diffrent dimensions.

Why is [5112 Income Service] slow when it is located after [520 Subtotal ; Production]?

Best regards,

Tina

|||

Hello again!

I get no answers, but I don't give up, here comes additional information:

The MDX in the Cube (it exists only this code):

CALCULATE;

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[?5111 Sales of Goods] AS

--Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]}

{[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5111]}

,FONT_FLAGS = '1';

CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[?5112 Income Service] AS

Aggregate({[Account].[AccountOGIS].[OGIS4Digit].&[T]&[5]&[51]&[511]&[5112]})

,FONT_FLAGS = '1';

Query 1 - Very fast:
SELECT { { { [Time].[Time].[Year].&[2006], [Time].[Time].[Year].&[2007] } * { [Version].[Version].[Actual], [Version].[Version].[Budget] } } } ON COLUMNS ,

NON EMPTY { { { DESCENDANTS( [Customer].[CustomerCountry].[All Customer Country], [Customer].[CustomerCountry].[Country] ) } * { DESCENDANTS( [Customer].[CustomerGroup].[All Customer Group], [Customer].[CustomerGroup].[Group Omya] ) } * { DESCENDANTS( [Product].[ProductGroup].[All ProductGroup], [Product].[ProductGroup].[Product] ) } } } ON ROWS

FROM [Complete]

WHERE ( [Account].[AccountOGIS].[?5111 Sales of Goods], [Measures].[Amount] )

CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL, ACTION_TYPE

Query 2 - Very Slow:

SELECT { { { [Time].[Time].[Year].&[2006], [Time].[Time].[Year].&[2007] } * { [Version].[Version].[Actual], [Version].[Version].[Budget] } } } ON COLUMNS ,

NON EMPTY { { { DESCENDANTS( [Customer].[CustomerCountry].[All Customer Country], [Customer].[CustomerCountry].[Country] ) } * { DESCENDANTS( [Customer].[CustomerGroup].[All Customer Group], [Customer].[CustomerGroup].[Group Omya] ) } * { DESCENDANTS( [Product].[ProductGroup].[All ProductGroup], [Product].[ProductGroup].[Product] ) } } } ON ROWS

FROM [Complete]

WHERE ( [Account].[AccountOGIS].[?5112 Income Service], [Measures].[Amount] )

CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL, ACTION_TYPE

(The Queries are created from ProClarity).

If I switch place between CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[5111 Sales of Goods] and CREATE MEMBER CURRENTCUBE.[Account].[AccountOGIS].[520 Subtotal ; Production] then Query 1 becomes very slow and Query 2 becomes very fast. WHY?

Best regards,

Tina N M?rnstam