Debian slow package install

chrisdblinux

New Member
hello,

This is my first time in the forum, so greetings to everyone here :)

I'm experiencing issues with my debian system (dual boot with Windows 10 -> windows also very slow)
The problem I have is that my system behaves badly (slow) when reading or writing to disk.

My system:
Code:
Type:   Laptop System: LENOVO product: 80XS v: Lenovo ideapad 320-15ABR serial: xxxxx 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709WIN serial: xxxxx UEFI: LENOVO v: 5QCN16WW 
           date: 05/22/2017

CPU: Quad Core AMD A10-9620P RADEON R5 10 COMPUTE CORES 4C+6G (-MCP-) speed/min/max: 1425/1300/2500 MHz
Kernel: 4.19.0-5-amd64 x86_64 Up: 41m Mem: 943.8/11458.5 MiB (8.2%) Storage: 931.51 GiB (1.5% used) Procs: 156
Shell: bash 5.0.3 inxi: 3.0.32
I thought my harddrive was the problem, but badblocks did not report any issue.

I've also ran smartmontools, but from what I can tell, I see no immediate problem, but I'm not sure:
Code:
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-5-amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     ST1000LM035-1RK172
Serial Number:    WDEJ3SEK
LU WWN Device Id: 5 000c50 0ab064c0e
Firmware Version: LVM2
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Aug 18 12:53:42 2019 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (    0) seconds.
Offline data collection
capabilities:                    (0x71) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 160) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x3035) SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   082   064   034    Pre-fail  Always       -       151007313
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       507
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   073   060   045    Pre-fail  Always       -       21301192
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       269 (211 195 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       425
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       1
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   070   051   040    Old_age   Always       -       30 (Min/Max 23/33)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       6
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       11
193 Load_Cycle_Count        0x0032   096   096   000    Old_age   Always       -       8918
194 Temperature_Celsius     0x0022   030   049   000    Old_age   Always       -       30 (0 19 0 0 0)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x000f   100   100   030    Pre-fail  Always       -       233 (64 197 0)
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
lspci -k:
Code:
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Complex
   Subsystem: Lenovo Family 15h (Models 60h-6fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit
   Subsystem: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Carrizo (rev ca)
   Subsystem: Lenovo Wani [Radeon R5/R6/R7 Graphics]
   Kernel driver in use: amdgpu
   Kernel modules: amdgpu
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
   Subsystem: Lenovo Kabini HDMI/DP Audio
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
   Kernel driver in use: pcieport
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Root Port
   Kernel driver in use: pcieport
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Host Bridge
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Carrizo Platform Security Processor
   Subsystem: Lenovo Carrizo Platform Security Processor
00:09.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Carrizo Audio Dummy Host Bridge
00:09.2 Audio device: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Audio Controller
   Subsystem: Lenovo Family 15h (Models 60h-6fh) Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 20)
   Subsystem: Lenovo FCH USB XHCI Controller
   Kernel driver in use: xhci_hcd
   Kernel modules: xhci_pci
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 49)
   Subsystem: Lenovo FCH SATA Controller [AHCI mode]
   Kernel driver in use: ahci
   Kernel modules: ahci
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 49)
   Subsystem: Lenovo FCH USB EHCI Controller
   Kernel driver in use: ehci-pci
   Kernel modules: ehci_pci
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 4a)
   Subsystem: Lenovo FCH SMBus Controller
   Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
   Subsystem: Lenovo FCH LPC Bridge
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 3
   Kernel driver in use: k10temp
   Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 4
   Kernel driver in use: fam15h_power
   Kernel modules: fam15h_power
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 60h-6fh) Processor Function 5
01:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)
   Subsystem: Lenovo QCA9377 802.11ac Wireless Network Adapter
   Kernel driver in use: ath10k_pci
   Kernel modules: ath10k_pci
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
   Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   Kernel driver in use: r8169
   Kernel modules: r8169
If you need anything else, just let me know :)
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter

chrisdblinux

New Member
Has this always happened or is it something new?

Look at https://p5r.uk/blog/2017/post-installation-tweaks-debian-stretch.html
for CPU microcode
and Hard Disk Optimisations

In terms of Windows have you seen https://support.microsoft.com/en-gb/help/4002019/windows-10-improve-pc-performance

What does the command: top
say?
This is nothing new. I've had these problems from the beginning.
I have to mention though that ArchLinux was faster, but from what I can read online, the packaging on Arch is much faster than Debian.... Anyway, I do not believe Debian is the problem.

Apparently the microcode solution was already installed by default
I did change fstab with the natime parameter and I believe the system to be faster, although I'm not sure.

Here's an example of the numix-icon-theme time
Code:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  numix-icon-theme
0 upgraded, 1 newly installed, 0 to remove and 42 not upgraded.
Need to get 2,026 kB of archives.
After this operation, 49.6 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 numix-icon-theme all 0~20180717-1 [2,026 kB]
Fetched 2,026 kB in 0s (4,294 kB/s)  
Selecting previously unselected package numix-icon-theme.
(Reading database ... 186542 files and directories currently installed.)
Preparing to unpack .../numix-icon-theme_0~20180717-1_all.deb ...
Unpacking numix-icon-theme (0~20180717-1) ...
Setting up numix-icon-theme (0~20180717-1) ...

real    0m32.664s
user    0m2.948s
sys    0m4.233s
Is this reasonable for my system specs? (the unpacking took the longest btw)
 
Last edited:

chrisdblinux

New Member
Ok, so I did some more research and apparently when I mount my disk with the following options:
Code:
relatime,barrier=0
the installation runs super fast

the question is however, is it dangerous to leave the option barrier=0?
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
I had not even heard of barrier until you mentioned it, but there does not appear to have been a lot of use of it over the last 6 years.

Have you run noatime after relatime for a comparison?

Wizard
 

rado84

Active Member
the question is however, is it dangerous to leave the option barrier=0?
For modern disks the performance sacrifice for doing this is negligible though, and you shouldn't disable write barriers unless absolutely necessary.
 

chrisdblinux

New Member
The installation is slow again when I re-enable barrier and put noatime + commit=600 instead

Sadly this was the only option that speeded up my installation... Since it's a risk, I won't use the barrier option, but I'm all out of ideas now
 

Members online

No members online now.

Latest posts

Top