New server cube processing timing out because the query wont run parallelism, what do i do?

jonjoseph@gmail.com 1 Reputation point
2020-09-03T18:47:24.843+00:00

So I am testing upgrading from 2017 to 2019 and one of the cubes keeps timing out after 1 hour.
I have tried changing any timeout options on SSAS from 60 to 180, yet it still fails.
The query plan on the previous server uses parallelism yet the new server wont.
I have changed the server parallelism cost down to 1 and maxdop to 4 and then to 0.
The only way to force the parallelism is to use querytraceon 8649, obviously this is not an option for processing the cube.

Does anybody have any idea why sqlserver has decided the best way is to process this really large query in single thread?
The server has 2 physical cores and 6 logical ones with 64GB RAM running sqlserver 2019 with the latest patch.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,760 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,245 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 101.4K Reputation points MVP
    2020-09-03T21:44:22.473+00:00

    It would seem that the optimizer thinks that the serial plan is cheaper.

    If you run in compat level 140, do you get the parallel plan? If so, do you have Query Store enabled on the database? If not, enable Query Store, and then use Query Store to force the parallel plan and change compat level to 150.

    1 person found this answer helpful.

  2. m 4,271 Reputation points
    2020-09-04T07:00:42.127+00:00

    Hi @jonjoseph@gmail.com ,

    Does anybody have any idea why sqlserver has decided the best way is to process this really large query in single thread?

    The number of worker threads spawned for each task depends on:

    1.Whether the request was eligible for parallelism as determined by the Query Optimizer.

    2.What is the actual available degree of parallelism (DOP) in the system based on current load. This may differ from estimated DOP, which is based on the server configuration for max degree of parallelism (MAXDOP). For example, the server configuration for MAXDOP may be 8 but the available DOP at runtime can be only 2, which affects query performance. Please reference:thread-and-task-architecture-guide

    You can test as next:

    Set SQL Engine Server side:
    USE dbname;
    GO
    EXEC sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE WITH OVERRIDE;
    GO
    EXEC sp_configure 'max degree of parallelism', 8;
    GO
    RECONFIGURE WITH OVERRIDE;
    GO

    USE dbname ;
    GO
    EXEC sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE ;
    GO
    EXEC sp_configure 'max worker threads', 512 ;
    GO
    RECONFIGURE;
    GO

    Set SSAS Process side:
    Test as next: Change Settings->Processing options->Parallel (Maximum parallel tasks) =4
    22559-maximum-parallel-tasks.jpg

    More information:
    configure-the-max-worker-threads-server-configuration-option,
    parallel-processing-best-practices

    BR,
    Mia
    If the reply is helped, please do “Accept Answer”.

    0 comments No comments

  3. m 4,271 Reputation points
    2020-09-07T01:51:05.59+00:00

    Hi @jonjoseph@gmail.com ,

    Is the reply helpful?

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    BR,
    Mia

    0 comments No comments