spaghettidba / WorkloadTools

A collection of tools to collect, analyze and replay SQL Server workloads, on premises and in the cloud
MIT License
232 stars 52 forks source link

Question: Link errors to event Id & You are here #71

Closed martin-guth closed 4 years ago

martin-guth commented 4 years ago

Hi Gianluca,

sorry this is more kind of a question than an issue however I thought I might post it here, that others with the same question might benefit from the answer.

I am currently in a corporate project week and we are leveraging WorkloadTools for benchmarking :-). Here are my questions. It would be great if you could help me with those:

Warn - WorkloadTools.Consumer.Replay.ReplayWorker : Worker [186] - Error: Die ROLLBACK TRANSACTION-Anforderung hat keine entsprechende BEGIN TRANSACTION-Anweisung.

Sorry for the german errortext...however is there any way to get back to the statement causing the error?

Info - WorkloadTools.Consumer.Replay.ReplayConsumer : 02.12.2019 12:20:50 oldest command date

However the time mentioned just relates to the current time and not the time from the recording. I am currently experiencing a 9 hour recorded workload with the replay running for 21 hours already. On the server I can't see any specific bottlenecks. Here's my JSON config for replay: {code} { "Controller": {

    "Listener":
    {
        "__type": "FileWorkloadListener",
        "Source": "X:\\DB_DistributedReplayClient\\20191126_3CDNCL11SQL.sqlite",
        "SynchronizationMode": "true"
    },

    "Consumers":
    [
        {
            "__type": "AnalysisConsumer",
            "ConnectionInfo":
                {
                    "ServerName": "3CDNDBPERF01",
                    "DatabaseName": "WorkloadAnalysis",
                    "SchemaName": "baseline"
                },
                "UploadIntervalSeconds": 60
        },
        {
            "__type": "ReplayConsumer",
            "ConnectionInfo":
                {
                    "ServerName": "3CDNDBPERF01",
                    "DatabaseName": "CCC"
                },
                "DisplayWorkerStats": "true",
                "ConsumeResults": "true",
                "WorkerStatsCommandCount": 1000,
                "MimicApplicationName": "true",
            "QueryTimeoutSeconds": 300
        }
    ]
}

} {code}

Thanks in advance for your help

Martin

spaghettidba commented 4 years ago

HI Martin,

Regarding the first question, the statement failing is... ROLLBACK TRANSACTION. I think I could add the event id to help you identify it in your workload.

Second question: percentage of executed queries. No ,there is no such thing at the moment. I could add that as a feature.

Long delay in replay: I know this is an issue. You're not the first to report it. I have not been able to reproduce this error and troubleshoot it enough. What I can suggest from the time being is that you set SynchronizationMode = false. This might help to a point.

Regarding workload amplification, I have taken multiple options into account and none of them seemed to be satisfying. The problem is data consistency (primary keys and unique indexes) when replaying the same workload. There is no easy way to do what you want, but you might have some success with a read-only workload. Write workloads would have to be evenly spread across each workers to be realistic, but that depends on parameters and I have no idea how to implement it.