Viewing s-Server Performance in SQLLine

<< Click to Display Table of Contents >>

Navigation:  Using sqlline >

Viewing s-Server Performance in SQLLine

Previous pageReturn to chapter overviewNext page

You can view s-Server's massive raw performance by using a script that generates data using a SQL "VALUES" clause. (The rate at which s-Server ingests data is generally much slower than the rate at which it processes data.) s-Server ships with an example script in $SQLSTREAM_HOME/examples/parallelPerformanceTest.

Note: $SQLSTREAM_HOME refers to the installation directory for s-Server, such as /opt/sqlstream/5.0.XXX/s-Server.

To run the script on a Linux machine, navigate to $SQLSTREAM_HOME/examples/parallelPerformanceTest and enter the following: %N


where "%N" is the number of pipelines you want to run. This number should correspond with the number of cores on your server.

For example, to run two pipelines, you would enter

./ 2


When you run, it generates the following four SQL scripts in your current directory:

setup%Npipelines.sql, which creates all streams and pumps.

startpumps%Npipelines.sql, a SQL script to start data flowing.

listen%Npipelines.sql, a SQL script to display totals every minute.

stoppumps%Npipelines.sql, a SQL script to stop data from flowing.

In these scripts, N pipelines are used to count rows, grouped by an integer column. Each pipeline aggregates its input, outputting every millisecond. A final query then sums those together, outputting every minute.

You can invoke these scripts by opening SQLLine and entering sqlline --run=<script name>

You should run these scripts in order.

For example, if you ran the script with two pipelines, you would navigate to $SQLSTREAM_HOME/bin, open SQLLine, and enter the following lines, one at a time:

!run ../examples/parallelPerformanceTest/setup2pipelines.sql

!run ../examples/parallelPerformanceTest/startpumps2pipelines.sql

!run ../examples/parallelPerformanceTest/listen2pipelines.sql


When you run listen2pipelines.sql, you will see something like the following:


Each line represents the number of rows per half minute.

To stop the pumps, enter the following

!run ../examples/parallelPerformanceTest/stoppumps2pipelines.sql