Bug 1031967 - Consider re-doing the ResourceConfiguration checking
Summary: Consider re-doing the ResourceConfiguration checking
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Performance, Plugin Container
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.10
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: JON3-2
TreeView+ depends on / blocked
 
Reported: 2013-11-19 09:18 UTC by Heiko W. Rupp
Modified: 2014-04-23 12:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-23 12:29:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2013-11-19 09:18:57 UTC
ConfigurationCheckExecutor has the following code

       Configuration original = resource.getResourceConfiguration();
       if (!liveConfiguration.equals(original)) {
          log.info("New configuration version detected on resource: " + resource);
          this.configurationServerService.persistUpdatedResourceConfiguration(
            resource.getId(), liveConfiguration);
          resource.setResourceConfiguration(liveConfiguration);

(which runs in a tight loop for a long time, thus using a lot of CPU and blocking other work, but that is a different story;
2013-11-11 14:43:49,292 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Configuration update check completed in 544077ms).

This assumes that we keep all resource configurations in memory. 
Such a configuration can use several kilobytes (for my current, already slightly tuned, heap, 7000 Configuration objects with ~64k PropertySimple take 12MB, with ~2100 resources, that is on average 5KB/resource) and with thousands of resources in memory that support configuration, this easily adds up to several Megabytes of heap.
As the configuration checking and also updating only happens infrequently, we could passivate those configurations to disk and read them back on demand, thus freeing a lot of heap.

Comment 1 Heiko W. Rupp 2013-11-25 09:01:46 UTC
Actually we should directly write those resource.resourceConfig items to disk when we receive them from the server and null out that field to reduce memory consumption and not wait until the checker runs.

Comment 2 Heiko W. Rupp 2014-02-05 09:28:22 UTC
master ea1f3b8

Comment 3 Heiko W. Rupp 2014-04-23 12:29:59 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


Note You need to log in before you can comment on or make changes to this bug.