This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 767205

Summary: Agent performs excessive IO when sending drift content to server
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Agent, driftAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 785847 (view as bug list) Environment:
Last Closed: 2013-08-31 06:15:33 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 760116    
Bug Blocks: 707225, 785847    

Description John Sanda 2011-12-13 09:40:44 EST
Description of problem:
When the server requests content for files previously reported, the agent receives a list of SHAs. The agent then performs a reverse look up, finding the corresponding file system path for each SHA. This involves reading the current snapshot file. The problem is that the snapshot file is read over and over again for each SHA. When the server sends a lot of SHAs, like with the initial snapshot, this results in excessive and unnecessary IO. The agent only needs to read the snapshot file once. Doing so will increase the memory usage for the duration of that method call; however, the overall execution time for the method will substantially be reduced as the number of SHAs passed to it increases in size. The increased memory footprint is likely on the order of bytes or 10s of kilobytes whereas the decrease in execution time could be on the order of milliseconds or seconds.

For testing, this should result in no change in functionality other than increased logging.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 John Sanda 2011-12-14 21:01:47 EST
DriftFilesSender has been refactored so that it only reads the snapshot file on disk once when looking up files by SHA.

master commit hash: 9f18aee38ed44f992ce26e7f8141a057af716533
Comment 2 Mike Foley 2011-12-15 14:11:48 EST
verified thru ad hoc testing on drift feature
Comment 3 Charles Crouch 2012-01-30 13:56:04 EST
Setting Target release correctly to RHQ4.3, since it was tested in master
Comment 4 Heiko W. Rupp 2013-08-31 06:15:33 EDT
Bulk close of old bugs in VERIFIED state.