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

Re: Debian not suitable for SSD due to apt/dpkg?

On Sat, Sep 29, 2012 at 11:15:45PM +0200, Bastian Blank wrote:
> If you have 5000 erase cycles, it will run for 13 years if you overwrite
> it once per day. Do you really expect this device to work until this?

Why not, my computer upgrade cycles are about 6-8 years and the
computer won't be idling all the time - especially considering modern
desktop environments running whole database engines to store
config/meta data.

Is writing of 160GB/day realistic? Hopefuly not, but see my apt
measurements below.

There is also something called SSD write amplification - the erase
blocks on the device are often larger than your normal filesystem
blocks, which might lead to up to 10x data actually writen to SSD,
i.e. down to 1.3years of overwrites in the extreme case.

> > iostat (part of sysstat) revealed, that simple apt-get update command
> > generated about 250MB of writes!
> How does it reveal this?

Running iostat -dm -p sda before and after apt-get, looking at the
MB_wrtn column.

Immediately after boot to xmonad:

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sda              81,24         1,96         0,12        175         10
sda1              3,38         0,01         0,00          1          0
sda2             64,64         1,89         0,12        170         10
sda3              1,78         0,01         0,00          0          0
sda4              0,02         0,00         0,00          0          0
sda5              1,82         0,01         0,00          0          0
sda6              3,65         0,02         0,00          1          0
sda7              5,56         0,02         0,00          1          0

After running apt-get update after about a week (relevant device only,
focus on the last column):

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sda2             42,66         0,75         4,32        246       1413

so just updating the package info wrote 1.4GB of data (disabling pdiff
might help as you suggested)

After running apt-get upgrade (expected APT DL size: 87.2MB):

Device:            tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
sda2             56,43         0,36         2,69        317       2376

so installing 90 MB of packages produced about 900 MB of writes

Running apt-get update again (there is nothing to update right now),
about 40 MB of data are written in each subsequent run.

> Disable pdiffs, mount /var/cache/apt as tmpfs, so at least the packages
> are not written again.

Good call, thanks


Reply to: