This is a migrated thread and some comments may be shown as answers.

Fluent Model doing Rollbacks on Read in DA Profiler

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guy
Top achievements
Rank 1
Guy asked on 06 Mar 2017, 09:46 PM

Recently moved from RLINQ or Database First to Fluent Code First.  We are running 10 times slower than we were.

Running the DA Profiler the difference is quite apparent.  The SQL Transactions are showing Rollbacks that were not occurring previously.  I broke it down to just reading the Database and making no changes and I'm still getting Rollbacks.  I have tried all option with the backend here are my current settings:

public static BackendConfiguration GetBackendConfiguration()

        {
            BackendConfiguration backend = new BackendConfiguration();
            backend.Backend = "MsSql";            
            backend.ProviderName = "System.Data.SqlClient";            
            backend.Logging.LogEvents = LoggingLevel.None;
            backend.Logging.MetricStoreSnapshotInterval = 0;
            backend.ConnectionPool.ActiveConnectionTimeout = 180;
            backend.ConnectionPool.Reserved = 2;
            backend.ConnectionPool.MaxActive = 20;
            backend.ConnectionPool.Integrated.TestInterval = 180;
            backend.ConnectionPool.Integrated.MaxIdle = 20;            
            backend.Runtime.CacheReferenceType = CacheReferenceType.Auto;
            backend.Runtime.ClassBehavior = DataAccessKind.Default;
            backend.Runtime.CompiledQueryCacheSize = 1000;
            backend.Runtime.ReadWithoutTransactions = true;
            backend.Runtime.Concurrency = TransactionMode.OPTIMISTIC_NO_LOST_UPDATES;
            backend.Runtime.SupportConcurrentThreadsInScope = true;
            backend.Runtime.LockTimeoutMSec = 60000;
            backend.Runtime.ReturnNullForRowNotFound = true;
            backend.Runtime.CommandTimeout = 180;
            backend.Runtime.StatementBatchingEnabled = true;
            backend.Runtime.StatementBatchingThreshold = 1;
            backend.Runtime.StatementBatchingSize = 100;            
            backend.SecondLevelCache.Enabled = false;
            backend.Logging.LogEvents = LoggingLevel.Normal;
            backend.Logging.StackTrace = true;
            backend.Logging.EventStoreCapacity = 10000;
            backend.Logging.MetricStoreCapacity = 3600;
            backend.Logging.MetricStoreSnapshotInterval = 1000;
            backend.Logging.Downloader.EventPollSeconds = 1;
            backend.Logging.Downloader.MetricPollSeconds = 1;            


            CustomizeBackendConfiguration(ref backend);

            return backend;
        }

 

What could be causing reads to have SQL transactions and them being rolled back?

 

 

1 Answer, 1 is accepted

Sort by
0
Guy
Top achievements
Rank 1
answered on 08 Mar 2017, 01:43 PM

So after many setting changes I could not stop Rollbacks occurring when reading from the DB.  I thought the Read Transaction Rollbacks were a performance issue, after finding the true cause of my performance issue there are still Read Rollbacks, but I'm able to read from the database now from 2016.2.822.1 as quick as I did with 2015.1.225.1.

The Rollbacks are still happening according to the DA Profiler, but they don't seem to be hindering performance.

This article explains the issue:

    http://www.telerik.com/forums/speed-issues-after-upgrade

 

Tags
General Discussions
Asked by
Guy
Top achievements
Rank 1
Answers by
Guy
Top achievements
Rank 1
Share this question
or