Diagnostics
Admin diagnostics allows the site administrator to run a series of automated tests against the platform to validate basic functionality across a number of services.
This functionality can be particularly helpful as a post-deployment step.
The site admin can assign user permission to access Admin Diagnostics by going to Admin > App permissions > Admin Diagnostics (Web Read).
Additionally, the Diagnostics API endpoints are publicly available. You can run these tests by issuing API calls to the system test and performance test endpoints.
System tests
System Tests are run as a group, with each test validating some individual functionality with API calls. Each individual test that fails will be reported, indicating that some attempted operation did not succeed or did not behave as expected.
The current set of tests verify that the following file operations are correctly performed on the Instabase Platform:
-
Create directory
-
Create new files
-
Copy and move files
-
Copy and move folders
-
List directory
-
Read and write large files (up to 100 MB)
-
Unzip and extract files
Performance tests
Performance tests meter and report execution of Instabase platform operations. These tests can be used to guage expectations on the performance of operations or investigate performance issues.
Instabase supports performance tests for the filesystem and database.
Filesystem test
Filesystem performance tests fall under two categories: API tests and RPC tests.
API tests send HTTP requests to the public filesystem APIs. API-level testing is useful for metering the performance of filesystem operations when interacting with the public API. RPC tests send requests directly to file-service, using internal endpoints.
RPC-level testing is useful for directly metering file service and provides the closest gauge of filesystem performance for Instabase applications. For example, you could use RPC testing to investigate filesystem performance within a Flow.
The following tests are available:
Test | Description |
---|---|
perf_test_read_file_api | Sends read requests to the public fileystem API |
perf_test_read_file_rpc | Sends a RPC read request directly to file-service |
perf_test_write_file_api | Sends write requests to the public filesystem API |
perf_test_write_file_rpc | Sends a RPC write request directly to file-service |
perf_test_write_file_multipart_rpc | Sends a RPC write reuqest directly to file-service . Useful for testing writes of large files 25mb >). Only available with File-Service V2 enabled. Defaults to perf_test_write_file_rpc if using File-Service V1. |
Recommended parameters
You can run filesystem performance tests flexibly over different file sizes (kb), duration (seconds), and number of threads (mimicking number of users concurrently issuing requests). Recommendations for parameterizing filesystem performance tests are provided below.
The results of running performance tests over these parameters is not guaranteed. Results depend on the specific environment and configuration of the Instabase installation. These numbers provide one example of how performance tests can be leveraged.
Smaller file size test:
-
file_sizes_kb = [0, 100, 1024 (1mb)]
-
num_threads = [4]
-
duration_seconds = 120
-
tests =[‘perf_test_read_file_api’, ‘perf_test_read_file_rpc’,‘perf_test_write_file_api’, ‘perf_test_write_file_rpc’]
Larger file size test:
-
file_sizes_kb = [10240 (10mb), 40960 (40mb)]
-
num_threads = [4]
-
duration_seconds = 120
-
tests = [‘perf_test_read_file_api’, ‘perf_test_read_file_rpc’,‘perf_test_write_file_api’, ‘perf_test_write_file_rpc’, ‘perf_test_write_multipart_file_rpc’]
Results
The following are sample results for tests run with the recommended parameters above. These results were produced on an Instabase sandbox deployment with the following configurations:
Config Type | Value |
---|---|
Kubernetes Service Location | US-East-2 |
Node Instance Type | spot instances (m5.2xlarge/m4.2xlarge/t3.2xlarge) |
File Storage | NFS (AWS EFS) |
File Storage Location | us-east 2 (NFS drive mounted on same deployment) |
The following table shows the average lantency and 90th percentile latency of each test. Each test name contains both the test type and the size of file used in the test. For example, Read-File RPC 100kb
means an RPC request was sent to file-service
to read a file with size 100kb
.
These results are only an example.
Test name | Avarage(s) | 90th percentile(s) |
---|---|---|
Read-File HTTP API 0kb | 0.1634 | 0.2108 |
Read-File RPC 0kb | 0.0395 | 0.0371 |
Write-File HTTP API 0kb | 0.2000 | 0.2711 |
Write-File RPC 0kb | 0.0623 | 0.0645 |
Read-File HTTP API 100kb | 0.1608 | 0.2117 |
Read-File RPC 100kb | 0.0630 | 0.0574 |
Write-File HTTP API 100k | 0.2187 | 0.2945 |
Write-File RPC 100kb | 0.1029 | 0.1218 |
Read-File HTTP API 1024kb | 0.1842 | 0.2530 |
Read-File RPC 1024kb | 0.0670 | 0.0624 |
Write-File HTTP API 1024kb | 0.2843 | 0.3826 |
Write-File RPC 1024kb | 0.1326 | 0.1744 |
Read-File HTTP API 10240kb | 0.6855 | 0.9704 |
Read-File RPC 10240kb | 0.2341 | 0.2725 |
Write-File HTTP API 10240kb | 1.1054 | 1.5175 |
Write-File RPC 10240kb | 0.4083 | 0.6975 |
Write-File Multipart RPC 10240kb | 0.4021 | 0.6522 |
Read-File HTTP API 40960kb | 2.1458 | 2.9503 |
Read-File RPC 40960kb | 0.9425 | 1.2062 |
Write-File HTTP API 40960kb | 3.6139 | 4.9440 |
Write-File RPC 40960kb | 1.5761 | 2.6686 |
Write-File Multipart RPC 40960kb | 1.5692 | 2.7027 |
Database test
Database performance RPC tests can be used to provide the baseline performance for each dialect (MySQL, Oracle, Postgres, SQLServer, SQLite). Each test sends a single RPC request to the database service and triggers testing for multiple iterations. Tests can help you diagnose potential issues in database servers.
The following tests are available:
Test | Description |
---|---|
perf_test_delete_database_rpc | Sends a RPC request to database-service to invoke a query to delete one row from testing table. |
perf_test_insert_database_rpc | Sends a RPC request to database-service to invoke a query to insert one row into testing table. |
perf_test_insert_large_text_database_rpc | Sends a RPC request to database-service to invoke a query to insert one row with long text into testing table. |
perf_test_join_database_rpc | Sends a RPC request to database-service to invoke a query to join two tables. |
perf_test_ping_database_rpc | Sends a RPC request to database-service to invoke a simple database query. |
perf_test_read_database_rpc | Sends a RPC request to database-service to invoke a query to search, read one row from testing table. |
perf_test_read_large_text_database_rpc | Sends a RPC request to database-service to invoke a query to read one row with long text into testing table. |
perf_test_scan_database_rpc | Sends a RPC request to database-service to invoke a query to scan the whole testing table. |
perf_test_scan_index_database_rpc | Sends a RPC request to database-service to invoke a query to scan the indexed column. |
perf_test_scan_sorted_database_rpc | Sends a RPC request to database-service to invoke a query to scan the whole testing table, order the entries. |
perf_test_update_database_rpc | Sends a RPC request to database-service to invoke a query to update one row into testing table. |
Recommended parameters
You can run database performance tests flexibly over different configurations. The configurable parameters include:
-
Iterations: Number of repetitions for each test case
-
Scan Test Row Count: Number of rows inserted during the setup process for SCAN related tests, including JOIN, SCAN, SCAN_INDEX, SCAN_SORTED tests.
-
Row Count: Number of rows inserted during the setup process for UPDATE/READ related tests, including READ, READ_LARGE_TEXT, UPDATE tests.
Recommendations for parameterizing database performance tests are provided below. The results of running performance tests over these parameters is not guaranteed. Results depend on the specific environment and configuration of the Instabase installation. These numbers provide one example of how performance tests can be leveraged.
Lightweight test:
-
iterations = 10000
-
scan_test_row_count = 10000
-
row_count = 100
-
tests =[‘perf_test_ping_database_rpc’, ‘perf_test_read_database_rpc’,‘perf_test_insert_database_rpc’, ‘perf_test_update_database_rpc’, ‘perf_test_delete_database_rpc’, ‘perf_test_insert_large_text_database_rpc’, ‘perf_test_read_large_text_database_rpc’]
Indepth test:
-
iterations = 100
-
scan_test_row_count = 10000
-
row_count = 100
-
tests = [‘perf_test_scan_database_rpc’, ‘perf_test_scan_index_database_rpc’, ‘perf_test_scan_sorted_database_rpc’, ‘perf_test_join_database_rpc’]
Results
The following are sample results for tests run with the recommended parameters above. The tests were run against a sandbox environment. The configurations are shown as below:
Config Type | Value |
---|---|
Kubernetes Service Location | US-East-2 |
Node Instance Type | spot instances (m5.2xlarge/m4.2xlarge/t3.2xlarge) |
Database Dialect | MySQL (AWS RDS) |
Database Instance Location | US-East 2 |
You can select any number of subtests (11 tests available) when starting a new performance test. The following table shows part of latency analysis extracted from the raw JSON result (in milliseconds). Each test name contains both test type and the number of entries the test works on. For example, SCAN RPC 10000 rows
means scanning a table with 10000 entries. For the details of all fields in raw JSON object, see the Diagnostics API documentation.
Test name | Average | 90th percentile |
---|---|---|
PING RPC | 0.935 | 0.988 |
READ RPC 100 rows | 0.664 | 0.511 |
INSERT RPC | 2.026 | 2.273 |
UPDATE RPC 100 rows | 0.992 | 0.930 |
DELETE RPC | 0.607 | 0.471 |
INSERT_LARGE_TEXT RPC | 37.543 | 81.253 |
READ_LARGE_TEXT RPC 100 rows | 4.015 | 4.756 |
SCAN RPC 10000 rows | 122.622 | 178.071 |
SCAN_INDEX RPC 10000 rows | 11.422 | 17.475 |
SCAN_SORTED RPC 10000 rows | 112.069 | 167.760 |
JOIN RPC 10000 rows | 30.595 | 33.087 |