Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServer - Use MEMORY_OPTIMIZED tables #483

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

No description provided.

@sebastienros
Copy link
Member

Intent?

@benaadams
Copy link
Contributor Author

benaadams commented May 25, 2018

Doesn't everyone use memory optimized tables for small tables these days? 😉

Demonstration: Performance Improvement of In-Memory OLTP

10453 ms , A: Disk-based table and interpreted Transact-SQL.  
5626 ms , B: memory-optimized table with hash index and interpreted Transact-SQL.  
3937 ms , C: memory-optimized table with hash index and native SP.  

@benaadams
Copy link
Contributor Author

Overview and Usage Scenarios

In-Memory OLTP can provide great performance gains, for the right workloads. One customer, bwin, managed to achieve 1.2 Million requests per second with a single machine running SQL Server 2016 (13.x), leveraging In-Memory OLTP. Another customer, Quorum, managed to double their workload while reducing their resource utilization by 70%, by leveraging In-Memory OLTP in SQL Database. While customers have seen up to 30X performance gain in some cases, how much gain you see depends on the workload.

Performance and Scalability

Concurrency: Applications whose performance is affected by engine-level concurrency, such as latch contention or blocking, improves significantly when the application moves to In-Memory OLTP.

@benaadams
Copy link
Contributor Author

Can also change SCHEMA_AND_DATA to SCHEMA_ONLY if you don't mind updates being lost on restarts - but should make the multi-updates faster

@sebastienros
Copy link
Member

Ok, it might make the queries faster. But should we make the db as fast as we can?
For instance we don't apply optimizations on postgres or mysql to follow what TE is doing, and have some stable engine so that our graphs have only one variable, the runtime and packages.

Today TE is not testing SQL Server, but I can imagine they will at some point. I'd rather wait for their configuration and copy what they do.

So yeah, we could take this change because we are alone on it right now, but I don't really see any reason to when I see our goals of improving the dotnet performance. This is artificial gain. Do we have any proof also it will make a difference on our kind of load (dataset and queries)?

@benaadams
Copy link
Contributor Author

This is artificial gain. Do we have any proof also it will make a difference on our kind of load (dataset and queries)?

It pushes more load into the driver and less on the database; so its clear what in the driver needs optimizing.

Today TE is not testing SQL Server, but I can imagine they will at some point. I'd rather wait for their configuration and copy what they do.

I'd like to suggest a configuration to TE based on this and also do SqlServer tests

@benaadams
Copy link
Contributor Author

Which is why I also went for SCHEMA_AND_DATA as it applies to all tables; whereas SCHEMA_ONLY only applies to temp tables

@sebastienros
Copy link
Member

It pushes more load into the driver and less on the database; so its clear what in the driver needs optimizing.

I agree on that point

I'd like to suggest a configuration to TE based on this and also do SqlServer tests

If they decide to go with SQL Server, then we will align with anything they do. I'd like to hear from their intention then. And then do the same.

@benaadams
Copy link
Contributor Author

@benaadams
Copy link
Contributor Author

PR for comment: TechEmpower/FrameworkBenchmarks#3807

@natemcmaster natemcmaster changed the base branch from dev to master July 6, 2018 20:11
@sebastienros
Copy link
Member

We don't need it right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants