Not logged in : Login

About: VirtConfigScale     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtConfigScale
maker
Title
  • VirtConfigScale
isDescribedUsing
has creator
content
  • ---+Configuring Virtuoso for Scale %TOC% ---++ Background OpenLink Virtuoso is an engine of many features. It incorporates a database engine, Web server, RDF Quad Store, SPARQL processor, and the OpenLink Data Spaces (ODS) suite of applications for bookmarks, briefcase, wiki, webmail, etc. Naturally, each of these features has its dependencies and consequences for resource usage, be that in-memory or on disk. Here we present an overview of 3 possible configurations for Virtuoso. For comparison, we use Virtuoso Open-Source Edition (VOS) compiled on Debian GNU/Linux ("Testing" distribution). ---+++ Structure of a Virtuoso Installation A typical Virtuoso installation comprises the following files/areas: | *Directory* | *Description* | *Files* | *Size* | | <nowiki><code>/usr/bin/</code></nowiki> | Vital operating binaries for server and command-line client | <nowiki><code>virtuoso-t</code></nowiki> %BR% <nowiki><code>isql-v</code></nowiki> %BR% <nowiki><code>isql-vw</code></nowiki> | 9.2&#160;MB | | <nowiki><code>/usr/share/virtuoso/vad/</code></nowiki> | ODS and other packages (cartridges/sponger, tutorial, demo, isparql, etc.) | <nowiki><code>cartridges_dav.vad</code></nowiki> %BR% <nowiki><code>doc_dav.vad</code></nowiki> | 131&#160;MB | | <nowiki><code>/usr/lib/</code></nowiki> | client drivers for ODBC & JDBC | <nowiki><code>jdbc-2.0/virtjdbc*.jar</code></nowiki> %BR% <nowiki><code>virtodbc*.so</code></nowiki> | 12&#160;MB | | <nowiki><code>/usr/lib/virtuoso/hosting/</code></nowiki> | Runtime loadable plugins for hosting and wiki markup | <nowiki><code>wikiv.so</code></nowiki> %BR% <nowiki><code>mediawiki.so</code></nowiki> %BR% <nowiki><code>creolewiki.so</code></nowiki> | 3.6&#160;MB | | <nowiki><code>/var/lib/virtuoso/vsp/</code></nowiki> | Splash-page for top-level web interface | <nowiki><code>vsp/</code></nowiki> %BR% <nowiki><code>vsmx/</code></nowiki> %BR% <nowiki><code>images/</code></nowiki> %BR% <nowiki><code>frames/</code></nowiki> %BR% <nowiki><code>css/</code></nowiki> %BR% <nowiki><code>index.html</code></nowiki> %BR% etc. | 1.5&#160;MB | | <nowiki><code>/usr/share/doc/virtuoso-opensource/</code></nowiki> | Misc README data for OS platform | <nowiki><code>README.Debian</code></nowiki> %BR% <nowiki><code>README.CVS.gz</code></nowiki> %BR% etc. | 128&#160;KB | | <nowiki><code>/usr/lib/jena/</code></nowiki> | Java class modules for using Virtuoso from Jena | <nowiki><code>virt_jena.jar</code></nowiki> | 56&#160;KB | | <nowiki><code>/usr/lib/sesame/</code></nowiki> | Java class modules for using Virtuoso from Sesame | <nowiki><code>virt_sesame2.jar</code></nowiki> | 56&#160;KB | | <nowiki><code>/var/lib/virtuoso/db</code></nowiki> | Default database directory | <nowiki><code>virtuoso.ini</code></nowiki> %BR% <nowiki><code>virtuoso.db</code></nowiki> | 12&#160;MB | ---+++ Operation When the server is run against a given <code>.ini</code> file, it looks for a database at the name and location specified in that file. If none is found, the server will create an empty database with minimal system schema. If it finds an appropriate directory containing <code>*.vad</code> files (set in the virtuoso.ini file during '<code>make install</code>'), Virtuoso will install the Conductor package by default. From there on, the Virtuoso administrator is expected to use the Conductor, <code>&lt;http://localhost:8890/conductor/&gt;</code>, to install further packages such as the ODS application suite, etc. After a checkpoint, a <code>virtuoso.db</code> file forms a portable unit encapsulating the entirety of a database instance, and can be moved between servers, so you can implement custom applications and schemas using the client interfaces (SQL/ODBC/JDBC) and avoid installing any of the packages, even the Conductor, should you so desire. ---+++ Configuration Options The following parameters in a <code>virtuoso.ini</code> file defining a Virtuoso instance control the resource consumption and performance: | <b><nowiki><code>[Database]</code></nowiki></b> | | <nowiki><code>DatabaseFile</code></nowiki> | <nowiki><code>virtuoso.db</code></nowiki> | Filename of database file | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Database][docs]] | | <nowiki><code>FileExtend</code></nowiki> | <nowiki><code>200</code></nowiki> | The amount of 8K-sized pages by which the database file automatically grows when the current file is not large enough. | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Database][docs]] | | <nowiki><code>MaxCheckpointRemap</code></nowiki> | <nowiki><code>2000</code></nowiki> | Controls how many pages may be stored other than their logical page during checkpoints | [[http://docs.openlinksw.com:80/virtuoso/CHECKPOINT.html#checkpointparams][docs]] | | <nowiki><code>Striping</code></nowiki> | <nowiki><code>0</code></nowiki> | Enables the database file-striping mechanism | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Striping][docs]] | | <b><nowiki><code>[Parameters]</code></nowiki></b> | | <nowiki><code>ServerThreads</code></nowiki> %BR% a/k/a %BR% <nowiki><code>MaxClientConnections</code></nowiki> | <nowiki><code>20</code></nowiki> | maximum number of threads (SQL+HTTP) used in the server - should typically be close to but not over the licensed number of concurrent connections | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Parameters][docs]] | | <nowiki><code>CheckpointInterval</code></nowiki> | <nowiki><code>60</code></nowiki> | interval (minutes) at which Virtuoso will automatically make a database checkpoint | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Parameters][docs]] | | <nowiki><code>NumberOfBuffers</code></nowiki> | <nowiki><code>2000</code></nowiki> | controls the amount of RAM (8K pages) used by Virtuoso to cache database files | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Parameters][docs]] | | <nowiki><code>MaxDirtyBuffers</code></nowiki> | <nowiki><code>1200</code></nowiki> | The maximum number of modified buffers to store before writing | | | <nowiki><code>MaxStaticCursorRows</code></nowiki> | <nowiki><code>5000</code></nowiki> | the maximum number of rows returned by a static cursor | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#fp_checkpointAuditTrail][docs]] | | <nowiki><code>FreeTextBatchSize</code></nowiki> | <nowiki><code>100000</code></nowiki> | the amount of text data processed in one batch of the free-text index during batch reindexing | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Parameters][docs]] | | <b><nowiki><code>[HTTPServer]</code></nowiki></b> | |<nowiki><code>ServerThreads</code></nowiki> %BR% a/k/a %BR% <nowiki><code>MaxClientConnections</code></nowiki> | <nowiki><code>10</code></nowiki> | Maximum concurrent HTTP sessions; must be less than the overall database <code><nop>ServerThreads</code> | [[http://docs.openlinksw.com:80/virtuoso/webserver.html#vspconf][docs]] | | <nowiki><code>MaxKeepAlives</code></nowiki> | <nowiki><code>10</code></nowiki> | A maximum number of HTTP sockets with <code><nop>KeepAlive</code> connections | [[http://docs.openlinksw.com:80/virtuoso/webserver.html#vspconf][docs]] | | <nowiki><code>KeepAliveTimeout</code></nowiki> | <nowiki><code>10</code></nowiki> | Timeout (in seconds) before an idle HTTP connection is closed | [[http://docs.openlinksw.com:80/virtuoso/webserver.html#vspconf][docs]] | | <nowiki><code>HTTPThreadSize</code></nowiki> | <nowiki><code>280000</code></nowiki> | Stack-size of an HTTP thread for handling connection and processing | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_HTTPServer][docs]] | | <b><nowiki><code>[Striping]</code></nowiki></b> | | <nowiki><code>Segment1</code></nowiki> | <nowiki><code>100M, db-seg1-1.db, db-seg1-2.db</code></nowiki> | Segment-specification for disk-striping | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Striping][docs]] | | <nowiki><code>Segment2</code></nowiki> | <nowiki><code>100M, db-seg2-1.db</code></nowiki> | | | | <b><nowiki><code>[SPARQL]</code></nowiki></b> | | <nowiki><code>ResultSetMaxRows</code></nowiki> | <nowiki><code>100000</code></nowiki> | Maximum number of rows in a SPARQL resultset | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_SPARQL][docs]] | | <b><nowiki><code>[Plugins]</code></nowiki></b> | | <nowiki><code>LoadPath</code></nowiki> | <nowiki><code>/usr/lib/virtuoso/hosting</code></nowiki> | Directory in which to search for plugins | [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#ini_Plugins][docs]] | | <nowiki><code>Load1</code></nowiki> | <nowiki><code>plain, wikiv</code></nowiki> | Main ODS-Wiki markup parser | | | <nowiki><code>Load2</code></nowiki> | <nowiki><code>plain, mediawiki</code></nowiki> | Auxiliary <nop>MediaWiki markup parser module for ODS-Wiki | | | <nowiki><code>Load3</code></nowiki> | <nowiki><code>plain, creolewiki</code></nowiki> | Auxiliary Creole wiki markup parser module for ODS-Wiki | | | <nowiki><code>Load4</code></nowiki> | <nowiki><code>plain, im</code></nowiki> | <nop>ImageMagick plugin used by ODS-Gallery | | | <nowiki><code>Load5</code></nowiki> | <nowiki><code>plain, wbxml2</code></nowiki> | <nop>WbXML plugin used by the SyncML package | | | <nowiki><code>Load6</code></nowiki> | <nowiki><code>plain, hslookup</code></nowiki> | Required for some Sponger Cartridge operations | | | <nowiki><code>Load7</code></nowiki> | <nowiki><code>Hosting, hosting_php.so</code></nowiki> | Module for hosting PHP scripts within Virtuoso | | | <nowiki><code>;Load8</code></nowiki> | <nowiki><code>Hosting,hosting_perl.so</code></nowiki> | Module for hosting Perl scripts within Virtuoso (unsupported at present) | | | <nowiki><code>;Load9</code></nowiki> | <nowiki><code>Hosting,hosting_python.so</code></nowiki> | Module for hosting Python scripts within Virtuoso (unsupported at present) | | | <nowiki><code>;Load10</code></nowiki> | <nowiki><code>Hosting,hosting_ruby.so</code></nowiki> | Module for hosting Ruby scripts within Virtuoso (unsupported at present) | | | <nowiki><code>;Load11</code></nowiki> | <nowiki><code>msdtc,msdtc_sample</code></nowiki> | For Microsoft XA transaction support | | *Notes*: * Striping is an obvious way to control the amount of disk-space used; by default, striping is off (<code>0</code>), so the <code>[Striping]</code> section does not come into play. * The checkpoint-interval setting is simply the amount of time for which a temporary database will grow before being checkpointed into the main <code>virtuoso.db</code> file, so the choice is scenario-dependent. For a given incoming transaction rate, a short interval will give frequent smaller checkpoints, while specifying a longer interval will make fewer, slower, checkpoints. * The numbers of threads in the database engine as a whole and specifically allocated to the HTTP server will control performance, and each thread will cost a given amount of memory. * Naturally you can disable any or all unused plugins to further reduce the memory footprint; for example, if not running ODS-Wiki, you can remove the <code>wikiv</code>, <code>mediawiki</code>, and <code>creolewiki</code> plugins. We have a documentation page on [[http://docs.openlinksw.com/virtuoso/rdfperformancetuning.html#rdfperfgeneral][tuning Virtuoso for RDF usage]]. ---++ Analysis Virtuoso provides the <nowiki><code>status()</code></nowiki> command, which may be executed through the SQL interface (e.g., <code>isql-v(1)</code>). The resultset from this command is [[http://docs.openlinksw.com:80/virtuoso/dbadm.html#DBSTAT][documented here]], but we specifically highlight consideration of the <nowiki><code>NumberOfBuffers</code></nowiki> parameter; <nowiki><code>status()</code></nowiki> output shows how many buffers the server is actually using, so you can tailor the allocated number accordingly. ---++ Default By default, the Debian <code>virtuoso-opensource</code> package enables all possible hosting options except Mono. | package .deb | 58&#160;MB | | server binary, /usr/bin/virtuoso-t | 8.3&#160;MB | | default database with Conductor installed | 37&#160;MB | | Virtual memory allocation | 354&#160;MB | | Resident memory used | 125&#160;MB | ---++ Embedded / Minimal The minimum that is required to run Virtuoso is the server executable (<nowiki><code>virtuoso-t</code></nowiki>, or in Commercial Edition, <nowiki><code>virtuoso-iodbc-t</code></nowiki>) compiled with as few options as possible, and the <nowiki><code>virtuoso.ini</code></nowiki> file. From there, the first time the server is run against the <nowiki><code>virtuoso.ini</code></nowiki>, it will create the empty database (<nowiki><code>virtuoso.db</code></nowiki>) with minimal schema. The most important parameter to consider when optimizing for size is <nowiki><code>NumberOfBuffers</code></nowiki>. By applying a few changes to <nowiki><code>virtuoso.ini</code></nowiki>, one can quite dramatically reduce the memory footprint: <verbatim> [Database] FileExtend = 100 ; down from 200 MaxCheckpointRemap = 1000 ; down from 2000 [TempDatabase] MaxCheckpointRemap = 1000 ; down from 2000 [Parameters] ServerThreads = 5 ; down from 10 # MaxClientConnections = 5 ; alias for ServerThreads CheckpointInterval = 10 ; down from 60 NumberOfBuffers = 100 ; down from 2000 MaxDirtyBuffers = 50 ; down from 1200 SchedulerInterval = 5 ; down from 10 FreeTextBatchSize = 1000 ; down from 100000 [HTTPServer] ServerThreads = 2 ; down from 5 # MaxClientConnections = 2 ; alias for ServerThreads KeepAliveTimeout = 5 ; down from 10 HTTPThreadSize = 10000 ; down from 280000 [Client] SQL_PREFETCH_ROWS = 10 ; down from 100 SQL_PREFETCH_BYTES = 4096 ; down from 16000 [Replication] ServerEnable = 0 ; changed from 1 [Zero Config] ;ServerName = virtuoso (SAUCE) ; commented-out [SPARQL] ResultSetMaxRows = 10000 ; down from 100000 [Plugins] ; ... ; comment-out all plugins </verbatim> Result: | default empty database with no Conductor installed | 12&#160;MB | | Virtual memory allocation | 150&#160;MB | | Resident memory used | 70&#160;MB | Executing <code>status()</code> shows that 1000 buffers are allocated and only 270 are in use. ---+++Comparison with LAMP On the same machine, we installed Apache 2.x and <nop>MySQL 5.0 server using standard Debian GNU/Linux packages: <verbatim> bash$ sudo apt-get install mysql-server apache2 </verbatim> This is not quite comparing like with like; Virtuoso includes not only HTTP and SQLinterfaces, but also a complete RDF Quad Store, SPARQL processor, free-text indexer, etc. However, out-of-the-box <nop>MySQL and Apache consumptions compare to the above-tuned Virtuoso as follows: | | *Apache* | *MySQL* | *Virtuoso* | | package *.deb | 45.6&#160;MB | - | 58&#160;MB | | server binary | 0.3&#160;MB | 7&#160;MB | 8.3&#160;MB | | default empty database | - | 21&#160;MB | 12&#160;MB | | virtual memory allocation | 229&#160;MB | 123&#160;MB | 350&#160;MB | | resident memory usage | 2.8&#160;MB | 15&#160;MB | 70&#160;MB | ---++Enterprise-wide In larger installations, the <nop>NumberOfBuffers parameter should be increased, but there is no point in making the process so large it has to swap. Therefore we recommend about 60% memory should be allocated to buffers. As examples, we consider two instances: our own web-server, [[http://www.openlinksw.com/][www.openlinksw.com]] (running on Debian GNU/Linux), and [[http://dbpedia.org/][DBpedia.org]] (running on Sun Solaris). | | *www* | *DBpedia* | |Virtual memory allocated | 2734&#160;MB | 6257&#160;MB | |Resident memory | 662&#160;MB (65%) | 6216&#160;MB (38%) | |Striping | 0 | 0 | |<code><nop>CheckpointInterval</code> | 120 | 60 | |<code><nop>NumberOfBuffers</code> | 20000, 18511 used | 100000, 99964 used | |<code><nop>MaxDirtyBuffers</code> | 8000 | 40000 | |<code><nop>MaxCheckpointRemap</code> | 16000 | 80000 | |<code><nop>FreeTextBatchSize</code> | 100000 | 100000 | |<code><nop>ServerThreads</code> (a/k/a <code><nop>MaxClientConnections</code>) | 10 | 1000 | |HTTP <code><nop>ServerThreads</code> (a/k/a <code><nop>MaxClientConnections</code>) | 250 | 100 | |<code><nop>HTTPThreadSize</code> | 280000 | 10000000 | |Plugins | only <code>wikiv</code> | <code>wikiv</code>, <code>imagemagick</code>, <code>wbxml2</code> | |SPARQL <code><nop>ResultSetMaxRows</code> | 1000 | 1000 | ---++References * Virtuoso [[http://docs.openlinksw.com/virtuoso/perfdiag.html][performance diagnostics]] * Virtuoso [[http://docs.openlinksw.com/virtuoso/ptune.html][performance tuning]]
id
  • 05e3a42e0551f57f5b43dd74c8bf1ef1
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtConfigScale
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:42:22Z
atom:updated
  • 2017-06-13T05:42:22Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git132 as of May 12 2023


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3238 as of May 23 2023, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 3 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software