Home
%3CLINGO-SUB%20id%3D%22lingo-sub-823337%22%20slang%3D%22en-US%22%3EIncrease%20data%20file%20size%20to%20improve%20HammerDB%20workload%20performance%20on%20General%20Purpose%20Managed%20Instance%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-823337%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20General%20Purpose%20tier%20of%20Managed%20Instance%20uses%20Azure%20Premium%20Storage%20to%20store%20database%20files.%20In%20Azure%20Premium%20Storage%20IO%20performance%20depends%20on%20the%20file%20size.%20Increasing%20file%20size%20might%20be%20an%20easy%20way%20to%20improve%20your%20performance.%20In%20this%20post%20you%20will%20see%20how%20to%20increase%20performance%20of%20%3CA%20href%3D%22https%3A%2F%2Fwww.hammerdb.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHammerDB%3C%2FA%3Eworkload%20from%2020K%20transactions%2Fminute%20to%20100K-300K%20transactions%2Fminute%20by%20increasing%20the%20database%20file%20size.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20General%20Purpose%20architecture%20of%20Managed%20Instance%2C%20the%20database%20files%20in%20storage%20layer%20have%20dedicated%20IO%20characteristics.%20IO%20performance%20of%20every%20database%20file%20depends%20on%20the%20file%20size%2C%20as%20shown%20in%20the%20following%20table%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128549iE7E632AF4D6A0D22%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22io-perf.png%22%20title%3D%22io-perf.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20means%20that%20you%20can%20easily%20provide%20better%20performance%20of%20IO%20subsystem%20by%20increasing%20the%20file%20size.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHowever%2C%20before%20you%20increase%20the%20file%20sizes%2C%20you%20should%20run%20your%20workload%20on%20the%20default%20file%20layout%20(with%20minimal%20sizes)%20and%20identify%20the%20bottlenecks.%3C%2FSTRONG%3E%20Otherwise%20you%20might%20change%20the%20wrong%20files%20and%20get%20unexpected%20effects%2C%20or%20you%20might%20use%20more%20storage%20than%20needed%20without%20getting%20any%20benefits.%3C%2FP%3E%0A%3CP%3EIn%20this%20article%20you%20will%20see%20how%20to%20analyze%20where%20the%20bottlenecks%20are%20and%20identify%20how%20to%20improve%20the%20performance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20experiment%2C%20we%20will%20see%20what%20effect%20increasing%20the%20file%20size%20has%20on%20workload%20performance%20of%20%3CA%20href%3D%22https%3A%2F%2Fwww.hammerdb.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHammerDB%3C%2FA%3E.%20I%20am%20using%20the%20following%20parameters%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EManaged%20Instance%20Service%20tier%3A%20%3CSTRONG%3EGeneral%20Purpose%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EvCores%3A%20%3CSTRONG%3E32%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EInstance%20size%3A%20%3CSTRONG%3E256GB%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EHammerDB%20Workload%3A%20%3CSTRONG%3ETPCC%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EHammerDB%20Databases%20size%3A%20%3CSTRONG%3E1000%3C%2FSTRONG%3E%3CSTRONG%3Ewarehouses%3C%2FSTRONG%3E(~100GB)%3C%2FLI%3E%0A%3CLI%3EHammerDB%20Virtual%20users%3A%20%3CSTRONG%3E50%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHammerDB%20is%20well-known%20tool%20for%20simulating%20TPC%20workload%20and%20benchmarking%20performance%20of%20databases.%20Therefore%2C%20I%20will%20assume%20that%20you%20are%20familiar%20with%20HammerDB.%20I%20will%20show%20the%20following%20results%20of%20a%20HammerDB%20experiment%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EResults%20of%20HammerDB%20workload%20performance%20with%20the%20minimal%20files.%3C%2FLI%3E%0A%3CLI%3EResults%20of%20HammerDB%20workload%20performance%20with%20pre-allocated%20data%20files.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId-1818295478%22%20id%3D%22toc-hId-1818295478%22%3EDefault%20configuration%3C%2FH2%3E%0A%3CP%3ERunning%20HammerDB%20on%20the%20default%20TPCC1000%20database%20gives%20the%20following%20results%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20814px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128551i13E013A1DDE84A81%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22hammer-1.png%22%20title%3D%22hammer-1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWith%2050%20HammerDB%20virtual%20users%20you%20can%20get%20~20K%20transactions%20per%20minute.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWait%20statistics%20might%20show%20what%20is%20slowing%20down%20the%20workload.%20One%20way%20to%20analyze%20wait%20statistic%20on%20Managed%20Instance%20is%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fsqlserverstorageengine%2F2019%2F03%2F05%2Fanalyzing-wait-statistics-on-managed-instance%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EQPI%20library%3C%2FA%3E.%20By%20analyzing%20wait%20statistics%2C%20we%20find%20that%20IO%20related%20wait%20statistics%20are%20dominant%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128553iDB50B1FDAAF1C155%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22qpi-1-1.png%22%20title%3D%22qpi-1-1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBuffer%20IO%2FPAGEIOLATCH%20wait%20statistics%20indicate%20that%20there%20is%20a%20potential%20issue%20with%20storage%20system.%20This%20can%20be%20confirmed%20by%20looking%20at%20the%20file%20IO%20statistics.%20Again%2C%20I%E2%80%99m%20using%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fsqlserverstorageengine%2F2019%2F03%2F04%2Fmeasuring-file-io-performance-on-managed-instance-qpi%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EQPI%20library%3C%2FA%3Eto%20analyze%20file%20IO%20statistics.%20The%20results%20of%20the%20file%20IO%20statistics%20analysis%20are%20shown%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128554iA1EFA123A08B92A5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22qpi-1-2.png%22%20title%3D%22qpi-1-2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EExpected%20average%20IO%20latency%20for%20General%20Purpose%20IO%20storage%20should%20be%205-10ms.%20However%2C%20we%20notice%20that%20the%20latency%20is%20between%200.2s%20and%201s.%20Note%20that%20IO%20latency%20is%20in%20the%20expected%20range%20(2-3ms)%3B%20however%2C%20the%20requests%20on%20data%20file%20are%20queued%20and%20most%20of%20the%20IO%20requests%20are%20waiting%20although%20the%20ones%20that%20are%20actually%20executed%20are%20fast.%20Also%2C%20note%20that%20there%20is%20500%20IOPS%20on%20data%20file%20that%20represents%20max%20for%20the%20smallest%20file%20(P10).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20IOPS%20value%20close%20to%20the%20limit%20and%20the%20high%20difference%20between%20write_latency%20and%20write_io_latency%20or%20between%20read_latency%20and%20read_io_latency%20might%20indicate%20that%20the%20file%20doesn%E2%80%99t%20have%20enough%20IO%20capacity.%3C%2FP%3E%0A%3CP%3ESince%20there%20is%20noticeable%20difference%2C%20I%20will%20repeat%20the%20experiment%20using%20a%20larger%20file%20size%20%E2%80%93%20in%20this%20case%20data%20file.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--733861483%22%20id%3D%22toc-hId--733861483%22%3EIncreased%20file%20size%3C%2FH2%3E%0A%3CP%3EThe%20General%20Purpose%20tier%20uses%20the%20remote%20Azure%20Premium%20Storage%20where%20IOPS%20and%20throughput%20depend%20on%20the%20file%20size.%20If%20we%20increase%20and%20pre-allocate%20the%20files%2C%20we%20will%20get%20better%20performance.%20Since%20there%20is%20an%20issue%20with%20data%20file%20latency%2C%20I%E2%80%99m%20increasing%20the%20size%20of%20tpcc1000%20data%20file%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3Ealter%20database%20tpcc1000%0Amodify%20file%20(name%3D'tpcc1000'%2C%20size%20%3D%20140%20GB)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20can%20increase%20the%20file%20size%20to%20any%20value%20higher%20than%20128GB%20to%20get%20the%20higher%20performance%20class.%20After%20executing%20this%20statement%2C%20performance%20of%20the%20HammerDB%20workload%20are%20slowly%20increasing%20as%20you%20can%20see%20in%20the%20picture%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20815px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128550i503EE70028D815E7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22hammer-2.png%22%20title%3D%22hammer-2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFile%20IO%20statistic%20analysis%20shows%20that%20latency%20on%20data%20file%20is%20much%20better%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128555i5DB737CD002913C6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22qpi-2-1.png%22%20title%3D%22qpi-2-1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ELatency%20is%20decreased%20to%2012ms%20both%20for%20read%20and%20write.%20Wait%20statistics%20also%20show%20that%20PAGEIOLATCH%20is%20not%20so%20dominant%20like%20in%20the%20previous%20case.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128556iB4F580785E4264EC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22qpi-2-2.png%22%20title%3D%22qpi-2-2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAfter%20some%20time%2C%20HammerDB%20uses%20between%20100K%20and%20300K%20transactions%2Fminute%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20817px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128552i42857A511F9A47DA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22hammer-3.png%22%20title%3D%22hammer-3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20way%2C%20we%20are%20getting%205-15x%20performance%20improvement%20with%20a%20simple%20change.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1008948852%22%20id%3D%22toc-hId-1008948852%22%3EConclusion%3C%2FH2%3E%0A%3CP%3EGeneral%20Purpose%20Instance%20enables%20you%20to%20improve%20performance%20of%20your%20workload%20by%20increasing%20the%20file%20size.%20Every%20file%20is%20placed%20on%20a%20separate%20disk%2Fcontainer%20that%20has%20dedicated%20IO%20performance%20and%20will%20not%20share%20IO%20resources%20with%20other%20files.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20properly%20identify%20IO%20bottlenecks%20you%20can%20improve%20performance%20of%20your%20workload%20by%20providing%20faster%20storage%20containers%20by%20increasing%20and%20pre-allocating%20the%20file%20size.%3C%2FP%3E%0A%3CP%3ENote%20that%20the%20environment%20we%20used%20is%20not%20representative%20of%20your%20environment.%20When%20replicating%20this%20experiment%2C%20expect%20to%20see%20similar%20but%20not%20exactly%20the%20same%20numbers.%20Also%2C%20the%20HammerDB%20workload%20is%20not%20a%20standardized%20experiment%20and%20there%20is%20no%20precise%20definition%20of%20client%20VM%20characteristics%2C%20network%20throughput%2C%20point%20in%20time%20when%20the%20Managed%20Instance%20is%20performing%20backups%2C%20etc.%20However%2C%20you%20should%20increase%20the%20performance%20if%20you%20identify%20the%20bottlenecks%20properly.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-823337%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EThe%20General%20Purpose%20tier%20of%20Managed%20Instance%20uses%20Azure%20Premium%20Storage%20to%20store%20database%20files.%20In%20Azure%20Premium%20Storage%20IO%20performance%20depends%20on%20the%20file%20size.%20Increasing%20file%20size%20might%20be%20an%20easy%20way%20to%20improve%20your%20performance.%20In%20this%20post%20you%20will%20see%20how%20to%20increase%20performance%20of%20%3C%2FSPAN%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20underline%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fwww.hammerdb.com%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EHammerDB%3C%2FA%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3Eworkload%20from%2020K%20transactions%2Fminute%20to%20100K-300K%20transactions%2Fminute%20by%20increasing%20the%20database%20file%20size.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-823337%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EManaged%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

The General Purpose tier of Managed Instance uses Azure Premium Storage to store database files. In Azure Premium Storage IO performance depends on the file size. Increasing file size might be an easy way to improve your performance. In this post you will see how to increase performance of HammerDB workload from 20K transactions/minute to 100K-300K transactions/minute by increasing the database file size.

 

In General Purpose architecture of Managed Instance, the database files in storage layer have dedicated IO characteristics. IO performance of every database file depends on the file size, as shown in the following table:

io-perf.png

This means that you can easily provide better performance of IO subsystem by increasing the file size.

However, before you increase the file sizes, you should run your workload on the default file layout (with minimal sizes) and identify the bottlenecks. Otherwise you might change the wrong files and get unexpected effects, or you might use more storage than needed without getting any benefits.

In this article you will see how to analyze where the bottlenecks are and identify how to improve the performance.

 

In this experiment, we will see what effect increasing the file size has on workload performance of HammerDB. I am using the following parameters:

  • Managed Instance Service tier: General Purpose
  • vCores: 32
  • Instance size: 256GB
  • HammerDB Workload: TPCC
  • HammerDB Databases size: 1000 warehouses (~100GB)
  • HammerDB Virtual users: 50

HammerDB is well-known tool for simulating TPC workload and benchmarking performance of databases. Therefore, I will assume that you are familiar with HammerDB. I will show the following results of a HammerDB experiment:

  1. Results of HammerDB workload performance with the minimal files.
  2. Results of HammerDB workload performance with pre-allocated data files.

Default configuration

Running HammerDB on the default TPCC1000 database gives the following results:

 

hammer-1.png

With 50 HammerDB virtual users you can get ~20K transactions per minute.

 

Wait statistics might show what is slowing down the workload. One way to analyze wait statistic on Managed Instance is QPI library. By analyzing wait statistics, we find that IO related wait statistics are dominant:

qpi-1-1.png

Buffer IO/PAGEIOLATCH wait statistics indicate that there is a potential issue with storage system. This can be confirmed by looking at the file IO statistics. Again, I’m using QPI library to analyze file IO statistics. The results of the file IO statistics analysis are shown below:

qpi-1-2.png

Expected average IO latency for General Purpose IO storage should be 5-10ms. However, we notice that the latency is between 0.2s and 1s. Note that IO latency is in the expected range (2-3ms); however, the requests on data file are queued and most of the IO requests are waiting although the ones that are actually executed are fast. Also, note that there is 500 IOPS on data file that represents max for the smallest file (P10).

 

The IOPS value close to the limit and the high difference between write_latency and write_io_latency or between read_latency and read_io_latency might indicate that the file doesn’t have enough IO capacity.

Since there is noticeable difference, I will repeat the experiment using a larger file size – in this case data file.

Increased file size

The General Purpose tier uses the remote Azure Premium Storage where IOPS and throughput depend on the file size. If we increase and pre-allocate the files, we will get better performance. Since there is an issue with data file latency, I’m increasing the size of tpcc1000 data file:

 

 

alter database tpcc1000
modify file (name='tpcc1000', size = 140 GB)

 

 

 

I can increase the file size to any value higher than 128GB to get the higher performance class. After executing this statement, performance of the HammerDB workload are slowly increasing as you can see in the picture below:

hammer-2.png

 

File IO statistic analysis shows that latency on data file is much better:

qpi-2-1.png

Latency is decreased to 12ms both for read and write. Wait statistics also show that PAGEIOLATCH is not so dominant like in the previous case.

qpi-2-2.png

After some time, HammerDB uses between 100K and 300K transactions/minute:

 

hammer-3.png

This way, we are getting 5-15x performance improvement with a simple change.

Conclusion

General Purpose Instance enables you to improve performance of your workload by increasing the file size. Every file is placed on a separate disk/container that has dedicated IO performance and will not share IO resources with other files. 

If you properly identify IO bottlenecks you can improve performance of your workload by providing faster storage containers by increasing and pre-allocating the file size.

Note that the environment we used is not representative of your environment. When replicating this experiment, expect to see similar but not exactly the same numbers. Also, the HammerDB workload is not a standardized experiment and there is no precise definition of client VM characteristics, network throughput, point in time when the Managed Instance is performing backups, etc. However, you should increase the performance if you identify the bottlenecks properly.