Virtuoso slow first response

When you first start Virtuoso and most database they are “cold” ie data has to be loaded directly from slow permanent storage, but once a given query loads the first time the dataset required for servicing the query is loaded in faster RAM “cache”, thus subsequent execution of the query is much faster.

The NumberOfBuffers INI file param specifies the number of 8K memory buffers are allocated by Virtuoso for hosting the database working set in memory as detailed in the Performance Tuning Guide. I would also recommend reading the Virtuoso Performance Diagnostics documentation.

Finally, note Virtuoso also provides functions to save the database working set memory state and reload it on restart start to preload the working set into memory resulting in the database effectively being pre-“warmed” with all previous queries being executed against the cached data in memory on first run, as detailed in the post Controlling the Database Working Set in OpenLink Virtuoso.