LD Meter Utility Usage Guide
What?
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).
Why?
While we may know principles, I/O has always given us surprises; the only way to optimize this is to measure.
How?
To use the LD Meter Utility:
- Load the ldmeter.sql script into your Virtuoso instance;
- Run
ld_meter_run(N)
to set the time interval in seconds in which the meter should be run which gets written to theld_metric
table which will contain data for the form:
SQL> 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>
Columns of interest are:
-
lm_n_rows
: number of rows(triples) loaded; -
lm_rows_per_s
: number of rows(triples) loaded per second.
Examples
Benchmarks, Redux: BSBM and I/O
- See Benchmarks, Redux (part 5): BSBM and I/O; HDDs and SSDs example test;
Related
- Virtuoso RDF Bulk Loader
- Virtuoso Tips and Tricks Collection
- Supporting Files for "Benchmarks, Redux" Blog Series