Bug 928380 - prelink fragments the files
Summary: prelink fragments the files
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: prelink
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-27 14:29 UTC by Jérôme
Modified: 2016-07-19 10:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 10:08:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jérôme 2013-03-27 14:29:46 UTC
Description of problem:

The below command shows that the file fragmentation increases after the first activation of prelink:
sudo find / -xdev -type f -exec filefrag '{}' \; | grep -v "[01] extent"


Expected results:

Why not reallocating the whole file when its content is changed ? Moreover it would also defragment the files which were previously fragmented.

Since the goal of prelink is to speedup the applications launch I think that reallocating the file blocks of the modified files isn't out of the scope of prelink.

Comment 1 Jakub Jelinek 2013-03-28 11:21:16 UTC
Prelink never writes into the original file, that would be racy.  It always writes first a new complete file in the same directory and then just renames it over.  I don't see how doing that can fragment the files, unless the filesystem does something bad.

Comment 2 Jérôme 2013-03-28 21:30:40 UTC
Then why not allocating the file at one time before filling its content ? This would possibly spare fragmentation.

Comment 3 Fedora End Of Life 2013-09-16 13:20:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 4 Fedora End Of Life 2015-05-29 08:57:23 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Mark Wielaard 2015-06-09 13:36:26 UTC
The not yet released elfutils 0.162 makes sure to call posix_fallocate for the whole elf size before writing. Which might help prevent fragmentation. Although I am slightly the current approach (which ftruncates the file and then writes the ELF parts) does cause fragmentation. It really shouldn't unless the file system is already fragmented/low on space. elfutils 0.162 will be released later this week and then be added to fedora rawhide.

Comment 6 Fedora End Of Life 2016-07-19 10:08:25 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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