[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing/updating packages are very slow



Igor Sverkos wrote:
> As you can see, it is always the "Unpacking" step which is taking all the time.

dpkg has added fsync() calls after all file actions.  This
significantly slows down file operations.  Basically it disables the
file system buffer cache causing it to operate at disk drive speeds.
This is why unpacking files is quite a bit slow.

> Everything seems to be fast. Unpacking kernel sources (tar -xaf
> linux-3.16.6.tar.xz) is no problem. Daily work is no problem.
> But when it comes to apt/aptitude and installing/updating packages,
> the system is very slow.
> 
> Any ideas/hints?

Install 'eatmydata' and use it when installing.

  apt-get install eatmydata

  eatmydata apt-get install stuff...

I expect this suggestion to be followed by many people griping that my
suggestion is unsafe and that the years and years we spent living
without fsync() were unsafe.  But we did.  We had at least a decade of
fast systems in the "before time".  And the system was much faster
then and life was good.  Therefore I include the warning that you must
decide yourself if you agree or disagree with flushing the cache and
running at hard disk speeds or enabling buffer cache and running at
ram buffer cache speeds.  Personally I use the LD_PRELOAD library for
everything.  YMMV.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: