Correct the Public Cloud Simulation load

The Public cloud load has a 20K iteration for each tenant and metric.
This is wrong and it will generate 30M messages.
The correct value is 5K and it will generate the expected 7.5M.

Also added documentation reflecting the changes in the code to
suppor tenant_id, resource_id and date.

Added documentation on how to set the system to deal with high load.

Change-Id: I9ca24cb46828b2a225bb61f720e54b55edb65571
This commit is contained in:
Fabio Giannetti 2015-10-06 11:18:33 -07:00
parent a4a1489eb2
commit e660d2febd
2 changed files with 94 additions and 4 deletions

View File

@ -18,7 +18,7 @@ do
#echo $tenant_id
resource_id="${s}_resource_t_${t}"
#echo $resource_id
python ceilosca-message-simulator.py --url rabbit://stackrabbit:password@localhost/ notify-client -m 20000 -s $s -a create -x $tenant_id -r $resource_id -d $date
python ceilosca-message-simulator.py --url rabbit://stackrabbit:password@localhost/ notify-client -m 5000 -s $s -a create -x $tenant_id -r $resource_id -d $date
done
done
done

View File

@ -3,23 +3,31 @@ ceilosca message simulator
This is a message generator simulator cloned from oslo.messaging
### Installation Instructions
# Installation Instructions
1. Create a virtual environment where to run the simulator.
```
virtualenv simulator
```
2. Activate the virtual environment.
```
source simulator/bin/activate
```
3. Install oslo.message
```
pip install oslo.messaging
```
4. Run the simulator
python ceilosca-message-simulator.py --url rabbit://stackrabbit:password@localhost notify-client -m 1 -s nova -a create
```
python ceilosca-message-simulator.py --url rabbit://stackrabbit:password@localhost notify-client -m 1 -s nova -a create -x tenant_id -r resource_id -d load_date
```
Note: The simulator has three main parameters:
@ -27,4 +35,86 @@ Note: The simulator has three main parameters:
-s service. Currently nova, cinder and glance are supported.
-a action. Currently create and delete are supported.
-a action. Currently create and delete are supported.
-x tenant. Defines the tenant_id you want to use to assign the load.
-r resource. Defines the resource_id you want to use to assign the load
-d load_date. Defines the load date so then you can create load for a specific date.
# Testing in a DevStack constrained environment with high load
Testing the system in a devstack environment is challenging when you want to go above
millions of messages. For this reason we came up with a set of steps that simplify
and allow stretching the envelope to achieve the required load.
The Public and Private simulation scripts are generating 7.5M. In order to successfully
load the devstack with these amounts these are the recommended steps.
Memory change for monasca-api, monasca-persister, and remove keystone auth for ceilometer-api:
## Increase memory for the monasca-api
```
sudo vim /etc/init/monasca-api.conf
```
Change:
```
exec /usr/bin/java -Dfile.encoding=UTF-8 Xmx1g -cp /opt/monasca/monasca-api.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.api.MonApiApplication server /etc/monasca/api-config.yml
```
To:
```exec /usr/bin/java -Dfile.encoding=UTF-8 -Xmx4g -cp /opt/monasca/monasca-api.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.api.MonApiApplication server /etc/monasca/api-config.yml
```
```
sudo service monasca-api restart
```
## Increase memory for the monasca-persister
```
sudo vim /etc/init/monasca-persister.conf
```
Change:
```
exec /usr/bin/java -Dfile.encoding=UTF-8 Xmx1g -cp /opt/monasca/monasca-persister.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.persister.PersisterApplication server /etc/monasca/persister-config.yml
```
To:
```
exec /usr/bin/java -Dfile.encoding=UTF-8 -Xmx4g -cp /opt/monasca/monasca-persister.jar:/opt/monasca/vertica/vertica_jdbc.jar monasca.persister.PersisterApplication server /etc/monasca/persister-config.yml
```
```
sudo service monasca-persister restart
```
## Remove ceilometer-api auth
```
sudo vim /etc/ceilometer/api_paste.ini
```
Change:
```
[pipeline:main]
pipeline = request_id authtoken api-server
```
To:
```
[pipeline:main]
pipeline = request_id api-server
```
and re-start the ceilometer api.