Skip to content

Commit a4fd181

Browse files
committed
Merge pull request microsoft#13 from Microsoft/jodebrui-patch-2
updated title and added some tips
2 parents 4b2baf9 + 4d0550c commit a4fd181

File tree

1 file changed

+7
-4
lines changed
  • samples/in-memory/ticket-reservations

1 file changed

+7
-4
lines changed

samples/in-memory/ticket-reservations/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Ticket Reservations Sample
1+
# In-Memory OLTP Performance Improvement Sample
22

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.
44

55
![Alt text](Screenshots/1.png "Ticket Reservations")
66

@@ -32,7 +32,7 @@ Ticket Reservations is a Windows Forms sample application built on .NET Framewor
3232
- Change InsertTicketReservations.sql to natively compiled (instructions in the same file)
3333

3434
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.
3636

3737
11. Go back to the app and run the workload again. No need to recompile or restart the application.
3838

@@ -45,12 +45,15 @@ The perf gains from In-Memory OLTP as shown by the load generation app depend on
4545
- more reads per write => lower perf gain
4646
- default setting is 10 rows per transaction and 1 read per write
4747

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+
4851
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.
4952
When deploying to Azure SQL Database, make sure to run the app in an Azure VM in the same region as the database.
5053

5154
## About the code
5255
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.
5356

5457
## More information
55-
- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx)
58+
- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/library/dn133186.aspx)
5659
- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx)

0 commit comments

Comments
 (0)