This chapter describes the advanced nGrinder controller configuration. Most time, you don't need to read this guide. However if you want to run nGrinder as the cloud based service or calibrate the behavior, you should read this chapter.
If you start tomcat with "catalina.sh start" or "startup.sh", nGrinder will create .ngrinder folder into user’s home folder after it start up successfully. it contains the configuration files and data.
.ngrinder default data location is following.
- Window; C:\Users\{userhome}\.ngrinder
- Unix/Linux; /home/{username}/.ngrinder
But if you assign the other folder as ngrinder home, please set Environment Variables “NGRINDER_HOME” before running tomcat.
${NGRINER_HOME} has followings
database=H2 database_username=admin database_password=admin
NOTE: If you like to use Cubrid for database, you need to add following configuration more
database_url={your_cubrid_host_ip_or_name}:{cubrid_port_maybe_33000}:{dbname}
NOTE: If you want to duplicate Cubrid DB with HA. Please enables HA in cubrid following the link and add the alternatives db address in database.conf
database_url_option=&althosts={you_cubrid_secondary_host_ip_or_name}:{cubrid_port_maybe_33000}
NOTE: Currently, we just support 2 types of database, H2,and Cubrid. If you want to use other DB, please modify the class org.ngrinder.infra.config.Database to add a new one, like Mysql or request to use to support it. In later version, we will make more flexible to use other type of DB.
|
Name |
Since |
Default Value |
Description |
|---|---|---|---|
|
verbose |
3.0 |
false |
Set verbose mode to print the more detailed log. |
|
security |
3.0.1 |
false |
You can specify whether nGrinder controller uses security mode or not. When the security mode is activated, Each test script is limited to access limited range of targets. Please refer Script Security |
|
agent.max.size |
3.0 |
10 |
The maximum number of agents which can be attached into one test. This is useful when you like to make nGrinder shared by more user. Each test can be assigned only limited number of agents. So If your nGrinder instance has 15 agents in total and you set this field 5, you can guarantee 3 users can run performance test concurrently. |
|
agent.max.vuser |
3.0 |
100 |
The maximum number of vuser which can be created per one agent. If your agent machine spec is good enough, you can increase this. |
|
agent.max.runcount |
3.0 |
10000 |
The maximum runcount of test per ech agent. |
|
agent.max.hour |
3.0 |
8 |
The maximum running hour of etest |
|
ngrinder.console.portbase |
3.0 |
12000 |
The starting port number of console which will be mapped to each test. You need to restart nGrinder to apply the this configuration. |
|
ngrinder.max.concurrenttest |
3.0 |
10 |
How many concurrent tests are allowed in ngrinder. |
|
ngrinder.max.waitingmilliseconds |
3.0 |
5000 |
How much milliseconds console will be waiting until all agents are connected. |
|
ngrinder.frontpage.rss |
3.0 |
http://www.cubrid.org/
|
You can point your own rss page on the ngrinder first page. |
| ngrinder.help.url | 3.1 | http://www.cubrid.org/
wiki_ngrinder/entry/user-guide |
If you want to provide your own custom help page. please modify this |
| ngrinder.langauge.default | 3.1 | en | language default en/kr/cn is available. This is useful when you're installing custom SSO plugin. |
| ngrinder.security.sha256 | 3.1 | false |
By default, ngrinder uses sha1 to encode password. If you ned shar256, please set true. You need to reinstall nGrinder to apply the this configuration. |
| ngrinder.dist.logback | 3.1.1 | true |
To be compatible with old agents (before 3.1.1), please set following to true. |
| ngrinder.dist.safe | 3.1.1 | false |
From 3.1.1, nGrinder doesn't check the file distribution result to speed up the test execution.
|
| ngrinder.dist.safe.region | 3.1.1 | false |
If some region has the slow connection speed, it may need the safe distribution in force. |
| ngrinder.dist.safe.threashhold | 3.1.1 | 1000000 |
Set the safe distribution threshold to enable safe distribution for specific transfer size in force. |
| The followings are related to the clustering. It should be very carefully set.
# You can refer http://www.cubrid.org/wiki_ngrinder/entry/controller-clustering-guide |
|||
| ngrinder.cluster.mode | 3.1 | false |
if you want to enable ngrinder controller clustering. please enable this with true. You need to restart nGrinder to apply the this configuration. |
| ngrinder.cluster.uris | 3.1 | none |
cache cluster uri of all clustered controller servers. only the controller and agents in same region will work together. You need to restart nGrinder to apply the this configuration. |
| ngrinder.cluster.listener.port | 3.1 | 40003 |
cache cluster listener port You need to restart nGrinder to apply the this configuration. |
This file provides the flexibility to configure default process and thread allocation scheme.
User ususally don’t know which process and thread combination provides the best performance.
Therefore, nGrinder let user just input expected vuser per agent and configure the process and thread count automatically.
With some experiments we found out that half of CPU core count in agents is best for the process count. However in some environment, it might be different. So we made this in separate javascript file which can be reused in controller.
The default content is like following.
nGrinder 3.0function getProcessCount(total) {
if (total < 2) {
return 1;
}
return 2;
}
function getThreadCount(total) {
if (total < 2) {
return 1;
}
return parseInt(total / 2 + 0.5);
}
function getProcessCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / 30);
}
return 2;
}
function getThreadCount(total) {
if (total < 2) {
return 1;
}
if (total > 80) {
return parseInt(total / (parseInt(total / 30)));
}
return parseInt(total / 2 + 0.5);
}
nGrinder 3.1.1
function getProcessCount(total) {
if (total < 2) {
return 1;
}
var processCount = 2;
if (total > 80) {
processCount = parseInt(total / 40) + 1;
}
if (processCount > 20) {
processCount = 20;
}
return processCount;
}
function getThreadCount(total) {
var processCount = getProcessCount(total);
return parseInt(total / processCount);
}
In ${NGRINDER_HOME}, there are some folders to store data used in nGrinder. Followings are description for them.
| Folder name | Description |
| logs | This store the nGrinder logs. nGrinder intercepts the tomcat log and save the log in ngrinder.log file. This log contains only controller related logs. You can monitor the content of this file through the admin menu. |
| perftest | This folder stores the each performance test related data.
|
| repos | This folder stores the script svn structures. The subfolder of this folder belongs to the each user. |
| script | This folder stores the script validation related resources. The subfolder of this folder is used for user script validation. |
| db | This folder store the H2 database data. |