Difference between revisions of "Performance Tuning Tips"

From RifidiWiki

Jump to: navigation, search
(Server Tuning)
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*Turn off diagnostic apps (others as well optional as shouldn't have impact unless used as part of apps) -
+
==Key Factors to consider==
 +
*What is the complexity of sensor events within Rifidi App (how long running, size of event data, frequency etc.)
 +
*reader adapter performance a. Note: Some reader/sensor adapters perform better than others dependent on vendor adapter native implementation (software and hardware)
 +
*Size of hardware running Rifidi (cpu, memory, storage)
 +
*Where are you integrating (local Mysql db, mqtt messaging, cloud, enterprise db, SAP, Salesforce, REST etc..)
  
 +
==Server Tuning==
 +
*Turn off diagnostic and monitoring apps in particular 12:Rifidi App: Monitoring:Tags  (others as well optional as shouldn't have impact unless used as part of apps) 
 +
 +
*How to Turn off Diagnostic:Tags  In server\applications\Diagnostic\Tags.properties set LazyStart=true (default is false) to stop Diagnistic:Tags app from starting by default - recenttags and currenttags commands will no longer function butr this will provide performance/memory improvement as in production mode these commands should not be required
 +
 +
*How to Turn off Monitoring:Tags  In server\applications\Monitoring\Tags.properties set LazyStart=true (default is false) (as of 3.1 release) to stop Monitoring:Tags app from starting by default Note: Tags will no longer be written to default queue to monitor Tag reads by work bench but this provides large performance increase under heavy loads
 
       0:Rifidi App: AppService:ReadZones (STARTED);
 
       0:Rifidi App: AppService:ReadZones (STARTED);
 
       1:Rifidi App: AppService:SensorStatus (STARTED);
 
       1:Rifidi App: AppService:SensorStatus (STARTED);
      2:Rifidi App: AppService:UniqueTagInterval (STARTED);
+
      2:Rifidi App: AppService:UniqueTagInterval (STARTED);
        3:Rifidi App: AppService:StableSet (STARTED);
+
      3:Rifidi App: AppService:StableSet (STARTED);
  4:Rifidi App: AppService:LimitStableSet (STARTED);
+
      4:Rifidi App: AppService:LimitStableSet (STARTED);
    5:Rifidi App: AppService:UniqueTagBatchInterval (START;
+
      5:Rifidi App: AppService:UniqueTagBatchInterval (START;
    6:Rifidi App: AppService:RSSI (STARTED);
+
      6:Rifidi App: AppService:RSSI (STARTED);
  7:Rifidi App: Diagnostic:GPIO (STOPPED);
+
      7:Rifidi App: Diagnostic:GPIO (STOPPED);
  8:Rifidi App: Diagnostic:Serial (STOPPED);
+
      8:Rifidi App: Diagnostic:Serial (STOPPED);
    9:Rifidi App: Diagnostic:Tags (STARTED);
+
      9:Rifidi App: Diagnostic:Tags (STARTED);
    10:Rifidi App: Diagnostic:TagGenerator (STARTED);
+
      10:Rifidi App: Diagnostic:TagGenerator (STARTED);'''
    11:Rifidi App: Monitoring:ReadZones (STARTED);
+
      11:Rifidi App: Monitoring:ReadZones (STARTED);  
 +
      12:Rifidi App: Monitoring:Tags (STARTED)
 +
      13:Rifidi App: Monitoring:SensorStatus (STARTED)
 +
 
  
      RmiProxyFactoryBean proxy = new RmiProxyFactoryBean();
 
      proxy.setCacheStub(true);
 
      proxy.setRefreshStubOnConnectFailure(true);
 
      proxy.setServiceInterface(SensorManagerService.class);
 
      proxy.setServiceUrl("rmi://[replace with ipaddress such as 127.0.0.1]:1101/SensorManagerService");
 
      proxy.setRemoteInvocationFactory(new ContextPropagatingRemoteInvocationFactory());
 
      proxy.afterPropertiesSet();
 
      SensorManagerService service = (SensorManagerService) proxy.getObject();
 
      ReaderDTO reader = service.getReader("LLRP_1");
 
}
 
 
*Consider changing java heap size settings from default 256mb (In eclipse this is limited to 256mb is my understanding)
 
*Consider changing java heap size settings from default 256mb (In eclipse this is limited to 256mb is my understanding)
Esper Performance Tuning Tips - http://esper.codehaus.org/esper-4.9.0/doc/reference/en-US/html/performance.html
+
*Best practice  - when creating custom esper wrap as a rifidi service (looking to make this easier in 3.1) - link to steps on how to config - [[How_to_add_a_new_Rifidi_Service]]
In particular (20.2.13. Tune or disable delivery order guarantees - if event order is not required by application such as in case of work in progress)  - considering option to override in 3.1 easier for user
+
*Consider level of logging - [[Use_org.rifidi.logging]]
*Esper Configuration - http://esper.codehaus.org/esper-4.2.0/doc/reference/en/html/configuration.html
+
*Turn off console output and run into background - [[Edge_Server_Configuration#Console]]
Package/class where Rifidi invokes Esper Manager - https://transcends.svn.cloudforge.com/rifidi/rifidi/trunk/org.rifidi.edge/src/org/rifidi/edge/services/EsperManagementServiceImpl.java
+
*Best practice  - when creating custom esper wrap as a rifidi service (looking to make this easier in 3.1) - link to steps on how to config - http://wiki.rifidi.net/index.php?title=How_to_add_a_new_Rifidi_Service
+
One can disable bundles in bundles.info (caution if not used by app or required by rifidi core) example bundles one can turn off is  mysql, aws bundles if not used by an rifidi app
+
  
 +
==Esper Tips==
 +
*Esper Configuration - http://esper.codehaus.org/esper-4.2.0/doc/reference/en/html/configuration.html
 +
Note: Package/class where Rifidi invokes Esper Manager -  This is where one can override Esper configuration - https://transcends.svn.cloudforge.com/rifidi/rifidi/trunk/org.rifidi.edge/src/org/rifidi/edge/services/EsperManagementServiceImpl.java
  
12:Rifidi App: Monitoring:Tags (STARTED)
+
*One can disable bundles in bundles.info (caution if not used by app or required by rifidi core) example bundles one can turn off is  mysql, aws bundles if not used by an rifidi app - [[How_to_add_OSGI_Bundles]]
13:Rifidi App: Monitoring:SensorStatus (STARTED)
+
*Esper Performance Tuning Tips when creating Esper for event processing/tag filtering - http://esper.codehaus.org/esper-4.9.0/doc/reference/en-US/html/performance.html

Latest revision as of 19:10, 1 October 2014

Key Factors to consider

  • What is the complexity of sensor events within Rifidi App (how long running, size of event data, frequency etc.)
  • reader adapter performance a. Note: Some reader/sensor adapters perform better than others dependent on vendor adapter native implementation (software and hardware)
  • Size of hardware running Rifidi (cpu, memory, storage)
  • Where are you integrating (local Mysql db, mqtt messaging, cloud, enterprise db, SAP, Salesforce, REST etc..)

Server Tuning

  • Turn off diagnostic and monitoring apps in particular 12:Rifidi App: Monitoring:Tags (others as well optional as shouldn't have impact unless used as part of apps)
  • How to Turn off Diagnostic:Tags In server\applications\Diagnostic\Tags.properties set LazyStart=true (default is false) to stop Diagnistic:Tags app from starting by default - recenttags and currenttags commands will no longer function butr this will provide performance/memory improvement as in production mode these commands should not be required
  • How to Turn off Monitoring:Tags In server\applications\Monitoring\Tags.properties set LazyStart=true (default is false) (as of 3.1 release) to stop Monitoring:Tags app from starting by default Note: Tags will no longer be written to default queue to monitor Tag reads by work bench but this provides large performance increase under heavy loads
      0:Rifidi App: AppService:ReadZones (STARTED);
      1:Rifidi App: AppService:SensorStatus (STARTED);
      2:Rifidi App: AppService:UniqueTagInterval (STARTED);
      3:Rifidi App: AppService:StableSet (STARTED);
      4:Rifidi App: AppService:LimitStableSet (STARTED);
      5:Rifidi App: AppService:UniqueTagBatchInterval (START;
      6:Rifidi App: AppService:RSSI (STARTED);
      7:Rifidi App: Diagnostic:GPIO (STOPPED);
      8:Rifidi App: Diagnostic:Serial (STOPPED);
      9:Rifidi App: Diagnostic:Tags (STARTED);
     10:Rifidi App: Diagnostic:TagGenerator (STARTED);
     11:Rifidi App: Monitoring:ReadZones (STARTED); 
     12:Rifidi App: Monitoring:Tags (STARTED)
     13:Rifidi App: Monitoring:SensorStatus (STARTED)


Esper Tips

Note: Package/class where Rifidi invokes Esper Manager - This is where one can override Esper configuration - https://transcends.svn.cloudforge.com/rifidi/rifidi/trunk/org.rifidi.edge/src/org/rifidi/edge/services/EsperManagementServiceImpl.java

Personal tools