Hello again,

I run into the same problems now with a complete different target
platform. The hardware consists of:

- BananaPi board (ARM)
- Debian stretch/testing root filesystem
- Filesystem itself is a F2FS which also supports fallocate
- Relative slow Class4 sdcard

If I upgrade the system the normal way it takes sometimes hours. For
example I installed libreoffice on this machine. It took at least one
hour to complete.

After that experience, I created a LD_PRELOAD library which catches the
fallocate system call. At the end this library avoids a call to
fallocate. Now I reinstalled the package by executing

LD_PRELOAD=libnosync.so dpkg -i libreoffice ...

The install process took only minutes.

So it would be at least a good idea to add an option to switch off this
fallocate stuff. This can be realized similar to the "fastio" option.

The same problem arises with a "linux-headers" package. This package
contains a lot of smaller files. The installation of it feels endless.

Johann Pfefferl

Guillem Jover <[email protected]> wrote:
> Control: tags -1 moreinfo
> 
> Hi!
> 
> On Wed, 2016-05-18 at 10:44:34 +0200, Dr. Johann Pfefferl wrote:
> > Package: dpkg
> > Version: 1.17.26
> > Severity: important
> 
> >    * What led up to the situation?
> > 
> >    Installation of a system takes an extreme long time. The systems have
> >    RAID controllers included:
> > 
> >    - Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 
> > PCI-Express Fusion-MPT SAS-2
> >    - Serial Attached SCSI controller: Intel Corporation C606 chipset Dual 
> > 4-Port SATA/SAS Storage Control Unit
> > 
> >    Classic SATA harddisks are connected to the IO controllers.
> > 
> >    Normally an install takes 10 minutes. On these systems it takes 50
> >    minutes.
> 
> Hmmm, I don't see why the hardware used there should in principle
> affect this but let's see.
> 
> >    * Analysis
> > 
> >    By bisecting the source code of "dpkg" package with git showed that
> >    commit 87b0b20b86407baf1deb4e91b3fd839e01228ac8
> > 
> >     commit 87b0b20b86407baf1deb4e91b3fd839e01228ac8
> >     Author: Guillem Jover <[email protected]>
> >     Date:   Tue Jul 15 21:00:52 2014 +0200
> > 
> >         dpkg: Try to preallocate the disk size for extracted files
> >         
> >         This might help in avoiding filesystem fragmentation, and possibly
> >         improve performance on some filesystems.
> >         
> >         We use the system specific methods if available, and only use
> >         posix_fallocate() if nothing else is available, because on some 
> > systems
> >         its semantics are counter to what we want to obtain here, as the 
> > libc
> >         library will fallback to manually writing '\0' to each block to 
> > force
> >         the preallocation, instead of just failing and leaving the 
> > application
> >         to do so if desired.
> > 
> >    introduced the massive slow down of the install process.
> > 
> >    After "git revert" of this commit the installation behaved as expected.
> > 
> >    So the problematic system call on these systems is "fallocate".
> 
> Thanks for tracking this down! What filesystem did you use there? In
> case it's not ext3/4 and you can try another reinstall using another
> filesystem to see if it helps, would be appreciated, because that would
> hint at a problem in the filesystem in the kernel.
> 
> Thanks,
> Guillem

-- 
Siemens AG
Corporate Technology
Research & Technology Center
CT RDA ITP SES-DE
Otto-Hahn-Ring 6
81739 Muenchen, Germany
mailto: [email protected]
phone: +49 89 636 634 021
fax:   +49 89 636 33045
_____________________________________________________
SIEMENS AG: Vorsitzender des Aufsichtsrats: Gerhard Cromme
Vorstand: Joe Kaeser, Vorsitzender
Roland Busch, Klaus Helmrich, Hermann Requardt,
Siegfried Russwurm, Michael Süß, Ralf P. Thomas
Sitz der Gesellschaft: Berlin und München, Deutschland;
Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684
WEEE-Reg.-Nr. DE 23691322

Reply via email to