1

I have an HTPC and media server running Mint 17.1 which is incredibly slow. The hardware specs are:

APU - AMD A8-5600k (4x 3.6GHz)
MB - MSI FM2-A55M-P33
RAM - 4GBm, 1333Mhz
HDD - Boot: WDC WD10EALX-089BA0 (1TB, 7200RPM); Other: 4X 3TB, 7200 RPM + 1x 1.5Tb, 7200 RPM

It used to run Win 7 and there were no issues with it, but after a HDD crash I decided to try out Mint.

Since I installed Mint a few weeks ago, the computer feels like a very, very old computer. From a clean restart:

  • Opening Chromium takes around 30 seconds
  • Opening the file manager takes 10-15 seconds
  • Taking an app like Kodi/XBMC from fullscreen to windowed can take anything from 20-60 seconds
  • If try to do something like have Amarok scan my music collection, the PC basically freezes. It keeps scanning, but it eventually gets so slow that it takes 5 minutes just to wake up from sleep.
  • The mouse lags in Kodi/XBMC
  • Youtube videos can stutter (unrelated to buffering)

Things that do work well are:

  • Video playback in Kodi. I can watch 1080p videos with no issue.
  • Games. Although the system isn't particularly strong, it can play games as expected. CS:GO, D3 and Skyrim (on very low settings) all work.
  • Often, when the computer appears to be completely frozen, SSH or workspaces would still run reasonably smoothly.
  • Plex Media Server usually works well. However, if the PC starts getting very slow, the videos it sends out can stutter.

I basically know nothing about Ubuntu/Linux (this HTPC is my first attempt). How can I troubleshoot this?

9
  • Do you use proprietary driver fglrx? – kirill-a Jan 26 '15 at 16:43
  • I used to use it until today, but after reading the forums and looking for solutions, I updated to the recommended driver. Neither driver seemed to make a difference. – DG1 Jan 26 '15 at 17:14
  • Open a terminal window and try the commands sudo hdparm -t /dev/sda and sudo hdparm -T /dev/sda. (these test your drive speeds. I'm taking a guess that /dev/sda will be your main hard drive, but the lsblk command shows the device name if I'm wrong) What do you get? – dataless Jan 27 '15 at 0:56
  • Also, you said this is your first Linux experience, but you've got 6 harddrives... how "creative" did you get with your installation options? How are the drives configured, and what filesystems did you use? – dataless Jan 27 '15 at 1:04
  • I'm at work right now, but I'll run the tests the moment I get home. With regards to creativity, my brother in law helped to set up the HDDs. From the top of my head: All drives are using ext4. All drives serve a single purpose and are mounted in a folder for that purpose (i.e. /videos/series or /music). /dev/sde is my boot drive and it's broken into 4 or 5 partitions for things like swap space etc. I'll give you the exact details when I get home in 7 hours. – DG1 Jan 27 '15 at 7:52
2

Since we seem to be onto something analyzing the drive speed, I'm going to convert this to an answer.

To diagnose drive freezes/slowness in Linux, first start with hdparm -t DEVICE to check the basic read speeds.

If the speeds seem slower than you'd expect from the drive, or erratic:

  • check dmesg (the kernel's internal log) to see if any obvious errors are showing up, like "ata1: reset link" type things. Use dmesg | less if you want to be able to scroll backward a long ways. ("q" to quit)
  • Check the drive's health using smartctl -a DEVICE. This takes a bit of learning to understand everything in there, but the immediate danger flag is if you see "Reallocated_Event_Count" with a "RAW_VALUE" in the tens or hundreds. That means your drive is finding lots of dying sectors and is using up its spares. There can be delays as it tries to recover a sector before deciding to relocate it.
  • in BIOS, make sure 'AHCI' mode is selected. It's the newer better protocol and gets tested the most and should have the least bugs with new consumer hardware.
  • likewise, make sure bios doesn't specify any "legacy mode" option for sata devices.
  • Make sure you've used an appropriate SATA cable. The ones you have lying around might only be rated for the original 1.5Gb/sec SATA-1
  • Try a different SATA cable just in case.
  • Try swapping which SATA port the drive is plugged into. WARNING: this will change the device name of the drive, so before you do this make sure your /etc/fstab is mounting drives by label or UUID and not by device name.
  • there is a badblocks program which will read every sector on the drive to see if any are unreadable. This usually takes a while.
  • You can always try updating your BIOS, too, in case they've discovered and fixed a bug.

If you need any additional info on those steps, just ask.

4
  • Can you give me an indication of what kind of speeds to expect? My drives differ significantly, at what level should I be worried? – DG1 Jan 28 '15 at 12:30
  • Any desktop-class spinning-disk harddrive made in the last 5 years should be able to deliver at least 80MB/sec after the second or third run of hdparm. A drive from 10 years ago might give you 60MB/sec. In your example above, 20MB/sec either indicates a VERY old drive, or problems. Also, your root filesystem is on a drive that seems to have erratic performance. That's the one I'd focus on. (I forgot to mention before, but try to get the system as idle as possible before running tests. Other programs competing with the test will make the test show lower numbers.) – dataless Jan 28 '15 at 18:40
  • also, there is a program iotop which can show you which programs are actively reading or writing the disk. – dataless Jan 28 '15 at 18:42
  • Ok great, I will run the tests tonight and provide feedback. – DG1 Jan 29 '15 at 6:25
0

Sounds like your HD is crashed. Buy a new HD. Or if you are lucky reallocate your HD to avoid the bad sectors. At Western Digital there is a program that they supply with New HD that can fix some if you can go to their website and find the EZ drive installation utility. Works only on WD HD. Good Luck!

1
  • If there is a HDD problem, the OP should see a lot of error messages in the dmesg output. – peterh Feb 19 '18 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.