-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 24/04/2014 13:05, Kingsley Idehen wrote:
> On 4/24/14 3:58 AM, Bart Vandewoestyne wrote:
>> Hello list,
>> 
>> I noticed that for most (if not all) of my queries, the first
>> time the query is run (right after i started the virtuoso
>> server), it takes much longer than all subsequent runs.  See e.g.
>> my query timings at
>> 
>> https://dl.dropboxusercontent.com/u/32340538/long_first_query.png
>>
>>
>> 
Using dstat monitoring, I noticed that during these long first query
>> runs, there is a lot of reading from disk.
>> 

Virtuoso has rather aggressive read-ahead behaviour when there is free
space for pages in its allocated in-memory working set (the buffers as
in NumberOfBuffers.) This is completely normal and, I'd say, desired
trade-off not unlike disk caching in most operating systems.

Under practical query load the working set will (hopefully) stabilise
over time and need to go to disk diminishes. The status() of your
virtuoso instance reveals the actual hit rates.

Yrjänä

>> I have some questions concerning this:
>> 
>> * What is the phenomenon I'm seeing here?  What is happening?
>> Why is this first run so much slower than all subsequent ones?
> 
> Basic DBMS behavior in regards to caching i.e., the first execution
> is typically more expensive (from your perspective) because the
> query solution data is making its way into the working set cache.
> 
> For instance, with the LOD cloud cache we host [1], following DBMS 
> server startup, we run a series of queries to get the engine warmed
> up (i.e., getting records from disk to working set cache).
> 
> Once the engine is warmed up, cache invalidation (yet another piece
> of fundamental DBMS functionality) takes care of working set
> management until the DBMS server is shutdown.
> 
>> 
>> * Can this 'warmup' phenomenon be reduced somehow so that also
>> the first queries run as fast as the subsequent ones?
> 
> No.
> 
> Think about this as being similar to 0 - 60 mph when dealing with
> the speed of a car. In a DBMS, the more memory you have the more
> data you pack into the working set cache, subject to I/O between
> disk and memory.
> 
>> 
>> * Is this phenomenon documented somewhere?  Is there a place
>> where I can read and learn more about it?
> 
> This is basic DBMS functionality.
> 
> Kingsley
>> 
>> Kind regards, Bart
>> 
>> ------------------------------------------------------------------------------
>>
>>
>> 
Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software Java
>> Based Open Source Intranet - Social, Extensible, Cloud Ready Get
>> Started Now And Turn Your Intranet Into A Collaboration Platform 
>> http://p.sf.net/sfu/ExoPlatform 
>> _______________________________________________ Virtuoso-users
>> mailing list Virtuoso-users@lists.sourceforge.net 
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
>
> 
Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software Java
> Based Open Source Intranet - Social, Extensible, Cloud Ready Get
> Started Now And Turn Your Intranet Into A Collaboration Platform 
> http://p.sf.net/sfu/ExoPlatform
> 
> 
> 
> _______________________________________________ Virtuoso-users
> mailing list Virtuoso-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 


- -- 
Yrjänä Rankka (gh...@zonk.net)
Grand Praetor of Excruciations - ZONK.NET Propaganda HQ
ZONK.NET - Advancing the Thermal Death of the Multiverse Since 1998
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJTWPVNAAoJEPwzzlnBROJ7agAP/38XcOGjCsA0iJp2dqNm9RJc
GEJwF7k/gn6fKEGpuo9/j7DbgDxr/2rY46kGnreNWSu0ApWGpasYs3RXtyi7Cj5i
LKhBrl1CpfQ/ELqowIlyBwXy52/wNTDEzJkaydSqXCjxCg5cun392pZFiildHxUR
selrCygQDa5CO0YjDj4JhrcDx6/F2rrw0tpLhsDjhVZaU0H2AbYf/ZARhbOfS/j/
Ly/NsRZHi/ZSCSWamY8FRchhQF8gjrH1vwcnkT/vVNiVz0apYyocgH1Unq96IXwJ
HZNScKFAbmdWTgt/CwsooS45iDkvXRlLM55/Rm94UG+sqDVuziFuEgQ0Odfzu5Cr
kSDZRFLqGqz1u7ZKg+ifHxhUQHO4v+KaRIOeGD+GtXIlopdvy8E1BSojp7AS93jW
9j3zR3tW/cvWO1qXq2W07QSkf5yqlFKbfuwrTJ4KzFEY8Gs4yQZfpy6/deL9dlEI
4yw5/REQiYqNlNMYCkNJm2Bf0TeXv7SBhv9XaQp/HGBcHPO5VT0NGFR3dtStTiK3
SHLra2h5hj4dWq+Nx4yq+G7ZsFIUB4sGqVSnKX2KsY4A3pfOu4orf3NdV5atVqIr
zRL59fsX/Xkz3nHx/ovjKEB5nbHL8RUsXkzVJQfK1l8ZgqVO+8xazczfr5RlcdJZ
bRCrVfMmawkmTcNkzRn1
=mtsm
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to