Ubuntu 運作速度非常慢(沒有記憶體或 CPU 問題)

Ubuntu 運作速度非常慢(沒有記憶體或 CPU 問題)

我有一台新筆記型電腦,我在上面雙啟動了 Windows 10 和 Kubuntu 18.04。過去幾天一切都很順利,但昨天和今天我的 Kubuntu 非常遲緩且極其緩慢。

沒有記憶體或 CPU 問題
我檢查過top,沒有任何異常,CPU和記憶體都保持在5%以下。我重新啟動了筆記型電腦,甚至登入畫面的顯示也需要很長時間。我也檢查過,iotop但似乎沒有進程忙於寫入或讀取。

足夠的空間

              total        used        free      shared  buff/cache   available
Mem:        8072692     2261004     1325488      137504     4486200     5381164
Swap:       7812092         768     7811324

系統必須能夠輕鬆處理 ubuntu,就像過去幾天一樣

中央處理器資訊

    Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping:            10
CPU MHz:             800.000
CPU max MHz:         1600,0000
CPU min MHz:         400,0000
BogoMIPS:            3600.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

記憶體資訊

MemTotal:        8072692 kB
MemFree:         1067644 kB
MemAvailable:    5165636 kB
Buffers:           94312 kB
Cached:          4350420 kB
SwapCached:           88 kB
Active:          2910268 kB
Inactive:        3677080 kB
Active(anon):    2040920 kB
Inactive(anon):   294884 kB
Active(file):     869348 kB
Inactive(file):  3382196 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:       7812092 kB
SwapFree:        7811324 kB
Dirty:            506280 kB
Writeback:          1052 kB
AnonPages:       2142736 kB
Mapped:          3351496 kB
Shmem:            193192 kB
Slab:             254680 kB
SReclaimable:     141592 kB
SUnreclaim:       113088 kB
KernelStack:        9088 kB
PageTables:        30456 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    11848436 kB
Committed_AS:    4448964 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      240244 kB
DirectMap2M:     5957632 kB
DirectMap1G:     2097152 kB

創業服務

UNIT                                                  LOAD   ACTIVE SUB     DESCRIPTION                                                       
accounts-daemon.service                               loaded active running Accounts Service                                                  
acpid.service                                         loaded active running ACPI event daemon                                                 
apparmor.service                                      loaded active exited  AppArmor initialization                                           
apport.service                                        loaded active exited  LSB: automatic crash report generation                            
avahi-daemon.service                                  loaded active running Avahi mDNS/DNS-SD Stack                                           
bluetooth.service                                     loaded active running Bluetooth service                                                 
clean-mount-point@media-rick-TOSHIBA\x20EXT.service   loaded active running Clean the /media/rick/TOSHIBA EXT mount point                     
console-setup.service                                 loaded active exited  Set console font and keymap                                       
cron.service                                          loaded active running Regular background program processing daemon                      
cups-browsed.service                                  loaded active running Make remote CUPS printers available locally                       
cups.service                                          loaded active running CUPS Scheduler                                                    
dbus.service                                          loaded active running D-Bus System Message Bus                                          
grub-common.service                                   loaded active exited  LSB: Record successful boot for GRUB                              
haveged.service                                       loaded active running Entropy daemon using the HAVEGE algorithm                         
irqbalance.service                                    loaded active running irqbalance daemon                                                 
kerneloops.service                                    loaded active running Tool to automatically collect and submit kernel crash signatures  
keyboard-setup.service                                loaded active exited  Set the console keyboard layout                                   
kmod-static-nodes.service                             loaded active exited  Create list of required static device nodes for the current kernel
ModemManager.service                                  loaded active running Modem Manager                                                     
mpd.service                                           loaded active running Music Player Daemon                                               
networkd-dispatcher.service                           loaded active running Dispatcher daemon for systemd-networkd                            
NetworkManager-wait-online.service                    loaded active exited  Network Manager Wait Online                                       
NetworkManager.service                                loaded active running Network Manager                                                   
packagekit.service                                    loaded active running PackageKit Daemon                                                 
polkit.service                                        loaded active running Authorization Manager                                             
rsyslog.service                                       loaded active running System Logging Service                                            
rtkit-daemon.service                                  loaded active running RealtimeKit Scheduling Policy Service                             
sddm.service                                          loaded active running Simple Desktop Display Manager                                    
setvtrgb.service                                      loaded active exited  Set console scheme                                                
snapd.seeded.service                                  loaded active exited  Wait until snapd is fully seeded                                  
systemd-backlight@backlight:intel_backlight.service   loaded active exited  Load/Save Screen Backlight Brightness of backlight:intel_backlight
systemd-fsck@dev-disk-by\x2duuid-FE67\x2d3101.service loaded active exited  File System Check on /dev/disk/by-uuid/FE67-3101                  
systemd-journal-flush.service                         loaded active exited  Flush Journal to Persistent Storage                               
systemd-journald.service                              loaded active running Journal Service                                                   
systemd-logind.service                                loaded active running Login Service                                                     
systemd-modules-load.service                          loaded active exited  Load Kernel Modules                                               
systemd-random-seed.service                           loaded active exited  Load/Save Random Seed                                             
systemd-remount-fs.service                            loaded active exited  Remount Root and Kernel File Systems                              
systemd-resolved.service                              loaded active running Network Name Resolution                                           
systemd-sysctl.service                                loaded active exited  Apply Kernel Variables                                            
systemd-sysusers.service                              loaded active exited  Create System Users                                               
systemd-timesyncd.service                             loaded active running Network Time Synchronization                                      
systemd-tmpfiles-setup-dev.service                    loaded active exited  Create Static Device Nodes in /dev                                
systemd-tmpfiles-setup.service                        loaded active exited  Create Volatile Files and Directories                             
systemd-udev-trigger.service                          loaded active exited  udev Coldplug all Devices                                         
systemd-udevd.service                                 loaded active running udev Kernel Device Manager                                        
systemd-update-utmp.service                           loaded active exited  Update UTMP about System Boot/Shutdown                            
systemd-user-sessions.service                         loaded active exited  Permit User Sessions                                              
thermald.service                                      loaded active running Thermal Daemon Service                                            
udisks2.service                                       loaded active running Disk Manager                                                      
ufw.service                                           loaded active exited  Uncomplicated firewall                                            
upower.service                                        loaded active running Daemon for power management                                       
[email protected]                         loaded active exited  /run/user/1000 mount wrapper                                      
[email protected]                                     loaded active running User Manager for UID 1000                                         
whoopsie.service                                      loaded active running crash report submission daemon                                    
wpa_supplicant.service                                loaded active running WPA supplicant          


總而言之,我的 Kubuntu 啟動後速度很慢(出現登入背景,但密碼欄位顯示需要很長時間)。我還沒有發現任何進程過度消耗CPU或記憶體。現在我真的不知道我該做什麼。


對評論的反應

1TB HDD 磁碟的 SMART 結果 在此輸入影像描述


韌體和BIOS
我的筆記型電腦:聯想ideapad 330

生物: 8TCN25WW

韌體SSD:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   128M  0 part 
├─sda2        8:2    0 443,1G  0 part 
└─sda3        8:3    0 488,3G  0 part /
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 119,2G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0  88,7G  0 part 
├─nvme0n1p4 259:4    0  1000M  0 part 
├─nvme0n1p5 259:5    0   7,5G  0 part [SWAP]
└─nvme0n1p6 259:6    0  21,9G  0 part 

我查看了 nvme0n1p6,並sudo smartctl -i /dev/nvme0n1p6給出了:

Model Number:                       KBG30ZMT128G TOSHIBA
Serial Number:                      18JPA1SDP1TP
Firmware Version:                   0105ADLA
PCI Vendor/Subsystem ID:            0x1179
IEEE OUI Identifier:                0x00080d
Controller ID:                      0
Number of Namespaces:               1
Namespace 1 Size/Capacity:          128,035,676,160 [128 GB]
Namespace 1 Formatted LBA Size:     512

答案1

您的硬碟可能有問題。

檢查您的 HDD SMART 資料...

啟動Disks應用程式並查看 SMART 數據。不要因為它OK說不存在真正的問題就認為這一點。讓我看一下螢幕截圖。

讓我們檢查您的檔案系統...

  • 引導至 Ubuntu Live DVD/USB
  • 打開一扇terminal窗戶
  • 類型sudo fdisk -l
  • 識別「Linux 檔案系統」的 /dev/XXXX 裝置名稱
  • 輸入sudo fsck -f /dev/XXXX# 將 XXXX 替換為您之前找到的號碼
  • 如果有錯誤,請重複 fsck 指令
  • 類型reboot

然後讓我們檢查是否有壞塊......

Note: do NOT perform this on a SSD

Note: do NOT abort a bad block scan!

Note: backup your important files FIRST!

sudo e2fsck -fcky /dev/sdXX# 唯讀測試

或者

sudo e2fsck -fccky /dev/sdXX# 無損讀/寫入測試(受到推崇的)

-k 很重要,因為它保存先前的壞塊表,並將任何新的壞塊添加到該表中。如果沒有 -k,您將丟失所有先前的壞塊資訊。

-fccky 參數...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.  This option may not be specified at the
          same time as the -n or -p options.

相關內容