<docbook><section><title>VirtTipsAndTricksGuideLDMeterUtility</title><para> </para>
<title>LD Meter Utility Usage Guide</title>LD Meter Utility Usage Guide
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What?</bridgehead>
<para>The meter is a stored procedure that records the CPU time, count of reads, cumulative elapsed time spent waiting for I/O, and other metrics.
 The code for this procedure (for 7 Single; this file will not work on Virtuoso 6 or earlier).</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why?</bridgehead>
 While we may know principles, I/O has always given us surprises; the only way to optimize this is to measure.<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
<para>To use the LD Meter Utility:</para>
<orderedlist spacing="compact"><listitem>Load the <ulink url="VirtTipsAndTricksGuideLDMeterUtility/ldmeter.sql">ldmeter.sql</ulink> script into your Virtuoso instance; </listitem>
<listitem>Run ld_meter_run(N) to set the time interval in seconds in which the meter should be run which gets written to the ld_metric table which will contain data for the form:</listitem>
</orderedlist><programlisting>SQL&gt; SELECT TOP 5 * FROM ld_metric;
lm_id             lm_dt                lm_first_id  lm_secs_since_start  lm_n_rows            lm_cpu      lm_n_reads           lm_read_time  lm_read_pct       lm_rows_per_s     lm_cpu_pct        lm_rusage
INTEGER NOT NULL  TIMESTAMP            INTEGER     INTEGER     INTEGER              INTEGER     INTEGER              INTEGER     DOUBLE PRECISION  DOUBLE PRECISION  DOUBLE PRECISION  VARCHAR
_______________________________________________________________________________


0                 2012.5.12 18:8.58 0  0           0           4521388              990868      NULL                 262                     NULL              NULL              NULL  vector(0x01431658,0x01431678,0x01431698,0x014316b8,0,0,168,5416,0x014316d8,0x014316f8)
1                 2012.5.12 18:9.28 0  0           30          5070755              1109729     NULL                 262                        0  18311.6229459018  396.1867937735409  vector(0x01437a78,0x01437a98,0x01437ab8,0x01437ad8,0,0,168,5416,0x01437af8,0x01437b18)
2                 2012.5.12 18:9.58 0  0           60          5599501              1228805     NULL                 262                        0  17624.27919069364  396.8867704409853  vector(0x014315f8,0x014315d8,0x014315b8,0x01431518,0,0,200,5416,0x01428fc8,0x01437898)
3                 2012.5.12 18:10.28 0  0           90          6143726              1347315     NULL                 262                        0  18140.2286590447  395.0201659944669  vector(0x014379b8,0x01437998,0x01437978,0x01437958,0,0,6856,5416,0x01437938,0x014316f8)
4                 2012.5.12 18:10.58 0  0           120         6689392              1467724     NULL                 262                        0  18188.26039132029  401.3199560014666  vector(0x01431658,0x01431678,0x01431698,0x014316b8,0,0,12360,5416,0x014316d8,0x01437b18)


5 Rows. -- 33 msec.
SQL&gt; 
</programlisting><para> Columns of interest are:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem>lm_n_rows: number of rows(triples) loaded; </listitem>
<listitem>lm_rows_per_s: number of rows(triples) loaded per second.</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3">Examples</bridgehead>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Benchmarks, Redux: BSBM and I/O</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem>See <ulink url="http://www.openlinksw.com/weblog/oerling/?id=1667">Benchmarks, Redux (part 5): BSBM and I/O; HDDs and SSDs</ulink> example test;</listitem>
</itemizedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtBulkRDFLoader">Virtuoso RDF Bulk Loader</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="http://www.openlinksw.com/dataspace/dav/wiki/Main/BenchmarksReduxSupportingFiles">Supporting Files for &quot;Benchmarks, Redux&quot; Blog Series</ulink></listitem>
</itemizedlist><para> </para>
</section></docbook>