You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/in-memory/ticket-reservations/README.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Ticket Reservations Sample
1
+
# In-Memory OLTP Performance Improvement Sample
2
2
3
-
Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec.
3
+
This Windows Forms sample application built on .NET Framework 4.6 demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec.
@@ -32,7 +32,7 @@ Ticket Reservations is a Windows Forms sample application built on .NET Framewor
32
32
- Change InsertTicketReservations.sql to natively compiled (instructions in the same file)
33
33
34
34
10. Publish the database project to the same database – the tool will take care of making the necessary changes.
35
-
Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes.
35
+
Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. To speed up the process you can run `TRUNCATE TABLE dbo.TicketReservationDetail` in the database.
36
36
37
37
11. Go back to the app and run the workload again. No need to recompile or restart the application.
38
38
@@ -45,12 +45,15 @@ The perf gains from In-Memory OLTP as shown by the load generation app depend on
45
45
- more reads per write => lower perf gain
46
46
- default setting is 10 rows per transaction and 1 read per write
47
47
48
+
If the performance profile after migration to In-Memory OLTP looks choppy, it is likely that log IO is the bottleneck. This can be mitigated by using [delayed durability] (https://msdn.microsoft.com/en-us/library/dn449490.aspx). This is enabled by running the following statement in the database:
49
+
`ALTER DATABASE CURRENT SET DELAYED_DURABILITY = FORCED`
50
+
48
51
With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO.
49
52
When deploying to Azure SQL Database, make sure to run the app in an Azure VM in the same region as the database.
50
53
51
54
## About the code
52
55
The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample.
0 commit comments