Bug 1145280

Summary: EAP Patch Upload / EAP Bundle Delete Causing Disk Memory Leak
Product: [JBoss] JBoss Operations Network Reporter: Matt Mahoney <mmahoney>
Component: Plugin -- OtherAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Matt Mahoney <mmahoney>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: lkrejci
Target Milestone: ER04   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-26 13:54:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1069547    
Attachments:
Description Flags
server.log none

Description Matt Mahoney 2014-09-22 17:57:31 UTC
Description of problem:
After Uploading an EAP Patch/Bundle, followed by an EAP Bundle Delete - JON server disk space does not get reclaimed. This has been seen via both the UI and CLI

Version-Release number of selected component (if applicable):
JON 3.3 ER03.1

How reproducible:
Always

Steps to Reproduce:
1. On JON server, use df to get the disk utilization stats for the partition on which JON and PSQL reside.
2. From the UI, Upload an EAP patch, such as jboss-eap-6.2.3-patch.zip using Bundle Creation Wizzard.
3. Once the upload is complete, again, get the disk utilization stats using df on the JON server.
4. From the UI, delete the EAP Bundle.
5. On the JON server, get the disk utilization stats.

6. Repeate the process 2 or 3 more times.
7. Try a Vacuum operation on the RHQ database, and then get JON disk utilization stats.

Actual results:
JON server disk utilization does not decrease after deleting an EAP Bundle.

Expected results:
Disk utilization should be reclaimed after deleting an EAP Bundle.

Additional info:

Comment 1 Matt Mahoney 2014-09-22 18:01:21 UTC
Created attachment 940108 [details]
server.log

Comment 2 Lukas Krejci 2014-09-26 13:44:36 UTC
From JON perspective, things seem to work OK in my testing. When a bundle version is deleted, all associated data is deleted from the database.

This might be an issue with Postgres.

If you're able to reproduce this, could you point me to your server so that I can investigate the environment there?

Comment 3 Lukas Krejci 2014-09-26 13:54:53 UTC
Upon discussing this with other devs, this is not considered an issue because it is default (and correct) behavior of Postgres.

The data files are not shrunk by default even during vacuum, only during vacuum full.

The argument against running vacuum full during our nightly vacuum job is the fact that shrinking the files will gradually fragment them on the disk leading to (potentially great) performance degradation.

For reference:
http://www.postgresql.org/docs/8.3/interactive/routine-vacuuming.html#VACUUM-FOR-SPACE-RECOVERY

I am closing this BZ as NOTABUG.