This chapter describes the advanced nGrinder controller configuration. You may not need to read this guide if you are not system admi. 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 ${user.home}/.ngrinder directory into user’s home directory after it starts up successfully. this directory contains the configuration files and data.
Following is .ngrinder default location.
- Window7 : C:\Users\${user.home}\.ngrinder
- Unix/Linux :${user.home}/.ngrinder
But if you like to assign the other directory for this, please set Environment Variables “NGRINDER_HOME” before running tomcat.
${NGRINER_HOME} contains the following files and directories.
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 org.ngrinder.infra.config.Database class to add a new one like Mysql. Or make a official request to us.
|
Name |
Since |
Default Value |
Description |
|---|---|---|---|
|
verbose |
3.0 |
false |
Set true to print the more detailed log. |
usage.report | 3.2 | true | Set false if you don't want to report ngrinder usage to google analytics. |
|
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 attached into one test. This is useful when you like to make nGrinder shared by more user. With this option, each test can use only limited number of agents. For example, if your nGrinder instance has 15 agents in total and you set this field 5, you can guarantee 3 users can run performance tests concurrently. |
|
agent.max.vuser |
3.0 |
1000 |
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 each test |
|
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 many milliseconds console will wait until all agents are connected. |
|
ngrinder.frontpage.rss |
3.0 |
http://www.cubrid.org/
|
You can point your own rss page on the nGrinder front 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 passwords. If you nedd 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 this 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 a some region has the slow connection speed, set true. |
| ngrinder.dist.safe.threashhold | 3.1.1 | 1000000 |
Set the safe distribution threshold to enable safe distribution for specific transfer size by 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 mode, Set true. You need to restart nGrinder to apply the this configuration. |
| ngrinder.cluster.uris | 3.1 | none |
All controller IPs which belong to the cluster. You need to restart nGrinder to apply this configuration. |
| ngrinder.cluster.listener.port | 3.1 | 40003 |
Communication port for Cache synchronization in the cluster. You need to restart nGrinder to apply the this configuration. |
function 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);
}
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);
}
function getProcessCount(total) {
if (total < 2) {
return 1;
}
var processCount = 2;
if (total > 80) {
processCount = parseInt(total / 40) + 1;
}
if (processCount > 10) {
processCount = 10;
}
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 saves the log in ngrinder.log file. This log contains only controller related logs. You can also 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 each user's svn repository. |
| script | This folder stores the script validation related resources. |
| db | This folder store the H2 database data. |