재부팅 후 Ubuntu Server Super Slow

재부팅 후 Ubuntu Server Super Slow

내 Ubuntu Server 20.04는 약 10~15분 전에 재부팅할 때까지 매우 빠르게 실행되었습니다. 이 글을 작성한 당시에는 종료하는 데 약 3~5분, 다시 시작하는 데 약 1~3분이 걸렸습니다. 이제 제가 하는 모든 작업은 매우 느리고 웹사이트가 로드되지 않습니다. 실행하는 데 약 5~10초가 걸립니다. ls방향을 찾고 있습니다. RAM은 약 8GB이고 SWAP 공간은 50GB이며 HDD 2개와 1개가 있습니다. SSD. 어떤 지침이라도 도움이 될 것입니다! 감사합니다. 로그나 파일이 필요하거나 원하는 경우 기꺼이 제공해 드리겠습니다.

맨 위


top - 19:42:00 up  1:43,  2 users,  load average: 0.40, 0.44, 0.57
Tasks: 216 total,   1 running, 215 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  1.7 sy,  0.0 ni, 93.3 id,  4.0 wa,  0.0 hi,  0.2 si,  0.0 st
MiB Mem :   7833.5 total,   4891.3 free,   1260.4 used,   1681.8 buff/cache
MiB Swap:  65536.0 total,  64037.3 free,   1498.7 used.   6287.4 avail Mem 
 Unknown command - try 'h' for help 
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                             
   2835 root      20   0  437496   3492   2036 S   3.0   0.0   2:17.34 ebpf.plugin                                                                                                                         
   2836 netdata   20   0   55524   5244   2008 S   2.0   0.1   1:31.61 apps.plugin                                                                                                                         
   2618 netdata   20   0  343024  87172   4060 S   1.0   1.1   0:57.31 netdata                                                                                                                             
    923 root      20   0  838872  16224   6192 S   0.3   0.2   0:12.16 f2b/server                                                                                                                          
   1066 mysql     20   0 1736500  48264   9200 S   0.3   0.6   5:17.49 mysqld                                                                                                                              
   2841 netdata   20   0  725444  11980   5240 S   0.3   0.1   1:24.26 go.d.plugin                                                                                                                         
  11134 root      20   0       0      0      0 I   0.3   0.0   0:00.07 kworker/1:3-events                                                                                                                  
      1 root      20   0  168612   9160   6308 S   0.0   0.1   0:03.88 systemd                                                                                                                             
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kthreadd                                                                                                                            
      3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp                                                                                                                              
      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp                                                                                                                          
      6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0H-kblockd                                                                                                                
      8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq                                                                                                                        
      9 root      20   0       0      0      0 S   0.0   0.0   0:00.79 ksoftirqd/0                                                                                                                         
     10 root      20   0       0      0      0 I   0.0   0.0   0:01.32 rcu_sched                                                                                                                           
     11 root      rt   0       0      0      0 S   0.0   0.0   0:00.02 migration/0                                                                                                                         
     12 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/0                                                                                                                       
     14 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0                                                                                                                             
     15 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/1                                                                                                                             
     16 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/1                                                                                                                       
     17 root      rt   0       0      0      0 S   0.0   0.0   0:00.31 migration/1                                                                                                                         
     18 root      20   0       0      0      0 S   0.0   0.0   0:00.76 ksoftirqd/1                                                                                                                         
     20 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/1:0H-kblockd                                                                                                                
     21 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kdevtmpfs                                                                                                                           
     22 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 netns                                                                                                                               
     23 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_tasks_kthre                                                                                                                     
     24 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kauditd                                                                                                                             
     26 root      20   0       0      0      0 S   0.0   0.0   0:00.00 khungtaskd                                                                                                                          
     27 root      20   0       0      0      0 S   0.0   0.0   0:00.00 oom_reaper                                                                                                                          
     28 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 writeback                                                                                                                           
     29 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kcompactd0                                                                                                                          
     30 root      25   5       0      0      0 S   0.0   0.0   0:00.00 ksmd                                                                                                                                
     31 root      39  19       0      0      0 S   0.0   0.0   0:00.00 khugepaged                                                                                                                          
    123 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kintegrityd                                                                                                                         
    124 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kblockd                                                                                                                             
    125 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 blkcg_punt_bio                                                                                                                      
    126 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 tpm_dev_wq                                                                                                                          
    127 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ata_sff                                                                                                                             
    128 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 md                                                                                                                                  
    129 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 edac-poller                                                                                                                         
    130 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 devfreq_wq                                                                                                                          
    131 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 watchdogd                                                                                                                           
    132 root      20   0       0      0      0 S   0.0   0.0   0:08.56 kswapd0                                                                                                                             
    133 root      20   0       0      0      0 S   0.0   0.0   0:00.00 ecryptfs-kthrea                                                                                                                     
    136 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kthrotld                                                                                                                            
    138 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 acpi_thermal_pm                                                                                                                     
    139 root      20   0       0      0      0 S   0.0   0.0   0:00.06 scsi_eh_0                                                                                                                           
    140 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 scsi_tmf_0                                                                                                                          
    141 root      20   0       0      0      0 S   0.0   0.0   0:00.05 scsi_eh_1                                                                                                                           
    142 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 scsi_tmf_1                                                                                                                          
    145 root      20   0       0      0      0 S   0.0   0.0   0:00.02 scsi_eh_2                                                                                                                           
    146 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 scsi_tmf_2                                                                                                                          
    147 root      20   0       0      0      0 S   0.0   0.0   0:00.01 scsi_eh_3                                                                                                                           
    148 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 scsi_tmf_3                                                                                                                          
    150 root      20   0       0      0      0 S   0.0   0.0   0:00.01 scsi_eh_4                                                                                                                           
    151 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 scsi_tmf_4 

시스템 로그

Aug 26 19:38:49 mail postfix/pickup[7411]: warning: maildrop/4BcGLg6Sy7z1P6tS: error writing 4BcGPj2rstz1P6tV: queue file write error
Aug 26 19:38:50 mail postfix/pickup[7411]: 4BcGPk2sYtz1P6tV: uid=0 from=<root>
Aug 26 19:38:50 mail postfix/cleanup[10988]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:38:50 mail postfix/cleanup[10988]: warning: 4BcGPk2sYtz1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:38:50 mail postfix/pickup[7411]: warning: maildrop/4BcGCl3HKWz1P6tL: error writing 4BcGPk2sYtz1P6tV: queue file write error
Aug 26 19:38:51 mail postfix/pickup[7411]: 4BcGPl2tGlz1P6tV: uid=0 from=<root>
Aug 26 19:38:51 mail postfix/cleanup[10817]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:38:51 mail postfix/cleanup[10817]: warning: 4BcGPl2tGlz1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:38:51 mail postfix/pickup[7411]: warning: maildrop/4BcGJP0tXyz1P6tQ: error writing 4BcGPl2tGlz1P6tV: queue file write error
Aug 26 19:38:52 mail postfix/pickup[7411]: 4BcGPm2v3Sz1P6tV: uid=0 from=<root>
Aug 26 19:38:52 mail postfix/cleanup[10988]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:38:52 mail postfix/cleanup[10988]: warning: 4BcGPm2v3Sz1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:38:52 mail postfix/pickup[7411]: warning: maildrop/4BcGP05FY8z1P6tR: error writing 4BcGPm2v3Sz1P6tV: queue file write error
Aug 26 19:38:53 mail postfix/pickup[7411]: 4BcGPn2vlhz1P6tV: uid=0 from=<root>
Aug 26 19:38:53 mail postfix/cleanup[10817]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:38:53 mail postfix/cleanup[10817]: warning: 4BcGPn2vlhz1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:38:53 mail postfix/pickup[7411]: warning: maildrop/4BcFwl1Dkmz1P6t1: error writing 4BcGPn2vlhz1P6tV: queue file write error
Aug 26 19:38:54 mail postfix/pickup[7411]: 4BcGPp2wX8z1P6tV: uid=0 from=<root>
Aug 26 19:38:54 mail postfix/cleanup[10988]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:38:54 mail postfix/cleanup[10988]: warning: 4BcGPp2wX8z1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:38:54 mail postfix/pickup[7411]: warning: maildrop/4BcFKb1RZqz1P6sP: error writing 4BcGPp2wX8z1P6tV: queue file write error
Aug 26 19:38:55 mail postfix/pickup[7411]: 4BcGPq2xQQz1P6tV: uid=0 from=<root>
Aug 26 19:39:01 mail CRON[11024]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Aug 26 19:39:01 mail CRON[11030]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Aug 26 19:39:02 mail systemd[1]: Starting Clean php session files...
Aug 26 19:39:02 mail systemd[1]: phpsessionclean.service: Succeeded.
Aug 26 19:39:02 mail systemd[1]: Finished Clean php session files.
Aug 26 19:39:43 mail postfix/master[2610]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 26 19:40:01 mail CRON[11166]: (www-data) CMD (php -f /var/www/nextcloud/cron.php)
Aug 26 19:40:01 mail CRON[11167]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Aug 26 19:40:43 mail postfix/master[2610]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 26 19:41:01 mail CRON[11214]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Aug 26 19:41:04 mail postfix/proxymap[6357]: warning: connect to mysql server 127.0.0.1:3306: Can't connect to MySQL server on '127.0.0.1' (110)
Aug 26 19:41:04 mail postfix/cleanup[10817]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "[email protected]"
Aug 26 19:41:04 mail postfix/cleanup[10817]: warning: 4BcGPq2xQQz1P6tV: sender_bcc_maps map lookup problem -- message not accepted, try again later
Aug 26 19:41:04 mail postfix/pickup[7411]: warning: maildrop/4BcG1N5yKQz1P6t8: error writing 4BcGPq2xQQz1P6tV: queue file write error
Aug 26 19:41:04 mail postfix/pickup[7411]: 4BcGSJ5QClz1P6tV: uid=997 from=<netdata>
Aug 26 19:41:43 mail postfix/master[2610]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 26 19:42:02 mail CRON[11299]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Aug 26 19:42:43 mail postfix/master[2610]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 26 19:43:01 mail CRON[11350]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Aug 26 19:43:15 mail postfix/proxymap[6357]: warning: connect to mysql server 127.0.0.1:3306: Can't connect to MySQL server on '127.0.0.1' (110)
Aug 26 19:43:15 mail postfix/trivial-rewrite[11236]: warning: proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf lookup error for "*"

기타 요청된 데이터

root@mail:/var/log# free -h

           total        used        free      shared  buff/cache   available 
Mem:       7.6Gi       1.2Gi       4.8Gi        27Mi       1.6Gi       6.1Gi 
Swap:       63Gi       1.5Gi        62Gi 

root@mail:/var/log# grep -i 스왑 /etc/fstab

 /dev/disk/by-uuid/0edf561f-17da-4d10-89f3-45f3abb4ee82 none swap sw 0 0 
 /swap.img  none    swap    sw  0   0

root@mail:/var/log# ls -al /swap.img

-rw------- 1 root root 4294967296 Aug 25 01:26 /swap.img

답변1

바이오스

HP 컴팩 6000 프로 SFF

2009년 8월 25일자 BIOS 버전 01.09를 사용하고 있습니다.

최신 BIOS 버전 02.03 Rev A(2015년 11월 27일자)가 있으며 다운로드할 수 있습니다.여기.

참고: 귀하의 모델 번호에 대한 올바른 웹페이지가 있는지 확인하십시오.

참고: BIOS를 업데이트하기 전에 백업을 잘 해 두십시오.

참고: BIOS를 업데이트하려면 Windows 또는 USB 플래시 키의 FreeDOS가 필요하거나 HP BIOS에 BIOS 자체에서 직접 업데이트할 수 있는 방법이 있는지 확인하세요.

교환

스왑이 65G로 과도합니다.

/dev/sda5에는 ~60G 스왑이 있고 /swap.img에는 ​​~4G 스왑이 있습니다.

/dev/sda5에서 ~60G 스왑을 제거하고 /swap.img의 4G 스왑에서만 실행합니다. 나중에 다른 용도로 ~60G /dev/sda5 파티션을 사용할 수 있습니다.

sudo swapoff -a # 스왑 끄기

/etc/fstab을 편집합니다:

sudo pico /etc/fstab

다음 줄을 주석 처리하세요.

/dev/disk/by-uuid/0edf561f-17da-4d10-89f3-45f3abb4ee82 none swap sw 0 0 

파일을 저장합니다.

sudo swapon /swap.img# /swap.img만으로 스왑을 활성화합니다.

이제 free -h대략 다음과 같아야 합니다.

           total        used        free      shared  buff/cache   available 
Mem:       7.6Gi       1.2Gi       4.8Gi        27Mi       1.6Gi       6.1Gi 
Swap:        4Gi         0Gi         4Gi 

접미사/mysql

/var/log/syslog에 postfix와 mysql 오류가 많이 있습니다. 나중에 문제를 해결해야 합니다. 필요한 경우 새로운 질문을 하십시오. mysql이 실행되지 않는 것처럼 보이는 이유를 살펴보세요.

SSD 대 HDD

지금은 HDD에서 부팅 중입니다.

시스템 속도를 더욱 높이려면 SSD에서 부팅하고 HDD를 데이터 드라이브로 만들도록 구성을 변경하는 것이 좋습니다. 즉... 시스템을 처음부터 다시 구축하는 것입니다.

관련 정보