possibly poor disk performance after Slackware 15.0 upgrade
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
But disk reads appear to also be slower than they were before. :-(((
On the whole it feels like disk accesses are slower on my 15.0 and i have no idea where to start troubleshooting.
I would start by confirming or rejecting your gut feel about speed. Do you still also have your old Slackware 11 installation? If so I would start by testing raw disk read performance with:
Code:
time dd if=/dev/sda of=/dev/null bs=8192 count=8192000
The above command will read 64GB of data from the beginning of your disk. If you want to test your entire disk you can remove the count argument:
Code:
time dd if=/dev/sda of=/dev/null bs=8192
But reading data will take a lot of time. If you have a lot of RAM (48 GB or more) you might want to read more than 64GB to avoid cache effects. As the command has to be run as root you will have to be very careful to not make a typo. The command dd is very powerful and can easily wipe your entire installation if something is typed wrong. This might be a good day to consider your backup strategy.
Once you have compared the output on Slackware 11 and 15 you will be able to say something like:
"The raw disk read performance is almost identical on Slackware 11 and Slackware 15"
or
"The raw disk read performance is about 5 times as fast on Slackware 11 compared to 15".
If the problem is with raw disk performance you should check things like modes with hdparm.
If raw disk performance is close to identical the next step will be to compare file system performance. That can be done by creating a big file by copying from /dev/zero. To avoid things getting mixed up I will not show that command until we know about your raw disk performance.
Funny that, I've some old USB disk formatted with new cfdisk and it was painfully slow.
But the same USB disk re-formatted with old cfdisk was OK.
So if the disk is really old, I'd suggest not to create partition tables with new tools.
And also note that ext3 is no longer separate in the kernel, it's now using ext4 driver.
Really old drives are better off with ext2 IIRC.
On my HP laptop with the 1.6 GHz Pentium dual core and which predates the Asus by a year, i decided to try ext4 for the root partition.
It appears to boot up faster than the newer Asus with the faster CPU and hard drive. It still experiences the same slow postgresql performance though.
I would start by confirming or rejecting your gut feel about speed. Do you still also have your old Slackware 11 installation? If so I would start by testing raw disk read performance with:
Code:
time dd if=/dev/sda of=/dev/null bs=8192 count=8192000
The above command will read 64GB of data from the beginning of your disk. If you want to test your entire disk you can remove the count argument:
Code:
time dd if=/dev/sda of=/dev/null bs=8192
But reading data will take a lot of time. If you have a lot of RAM (48 GB or more) you might want to read more than 64GB to avoid cache effects. As the command has to be run as root you will have to be very careful to not make a typo. The command dd is very powerful and can easily wipe your entire installation if something is typed wrong. This might be a good day to consider your backup strategy.
Once you have compared the output on Slackware 11 and 15 you will be able to say something like:
"The raw disk read performance is almost identical on Slackware 11 and Slackware 15"
or
"The raw disk read performance is about 5 times as fast on Slackware 11 compared to 15".
If the problem is with raw disk performance you should check things like modes with hdparm.
If raw disk performance is close to identical the next step will be to compare file system performance. That can be done by creating a big file by copying from /dev/zero. To avoid things getting mixed up I will not show that command until we know about your raw disk performance.
regards Henrik
I do have backups of the old Slack 11.0 partitions, but i'm not willing to be backing up the new 15.0 partitions and restoring the 11.0 ones, and restoring the 15.0 ones again. The process takes too long and i'm backlogged with work. :-|
I have one other machine with Slack 11.0, but it's a modern desktop machine and really not a valid comparison.
I have been looking into hdparm options, because i thought it could be that the drives aren't running at full speed by some quirk, but they appear to be running at their top mode, which is UDMA6. Multcount is at max, 32-bit I/O, etc.
I've tweaked the kernel SATA and AHCI settings too, because i thought that maybe the kernel was falling back to a compatibility/legacy ATA mode, but no, it appears AHCI is in use.
Does it load faster if the DB is stored on USB drive?
Or perhaps, if you'd mount /tmp as tmpfs and temporarily put the DB there, does it still load slow?
Just to make it clear if it's related to FS, the drive, the kernel, or memory degradation..
Because it could be many things, all I've seen is that your DB is loading slow and that you assume it's Slackware regression.
Does it load faster if the DB is stored on USB drive?
Or perhaps, if you'd mount /tmp as tmpfs and temporarily put the DB there, does it still load slow?
Just to make it clear if it's related to FS, the drive, the kernel, or memory degradation..
Because it could be many things, all I've seen is that your DB is loading slow and that you assume it's Slackware regression.
I tested using a ramdisk with tmpfs and didn't play around with the size, and ran promptly ran out of memory. I'll give this another try. USB disk, i'll also give this a try next.
I think i can rule out the filesystem, unless ext3 mode in the ext4 driver has some serious performance regressions.
Same for the hard drive, as it uses the exact same partition layout. I DO however think about the physical placement of the files on the disk, and wonder if that could cause the slowness. Maybe the files were fragmented and/or scattered?
I don't understand what you meant by memory degradation.
For the meantime i'm just using the SQL transaction "trick" i learned. It's still nowhere near as fast as it was previously though.
I don't understand what you meant by memory degradation.
RAM can degrade, corrode, melt, etc. There's memtest on DVD, if you suspect RAM trouble.
But if I had to guess what's going on: it's probably the DB, I'd generate a new DB and see if it's the same.
Bumping this thread in case somebody might have some new insight into this.
For the past 7 months i've just been putting up with what appears to be really poor disk throughput on my new Slackware 15.0 install. My primary hard drive is mainly affected by this. External USB hard drives appear to have better performance. And just today, i decided to watch a DVD using an external DVD-ROM drive. The drive throughput according to gkrellm maxes out at 1 MB/s, my DVDs are unwatchable. The video player i'm using is xine. CPU usage is low.
I don't know what else i could possibly check. I've compiled and recompiled the kernel. The cpufreq governor is set to "conservative", but even "performance" does nothing, only makes the CPU run hotter.
I'm thinking of downgrading the kernel to the version that i used the longest on this machine, 2.6.31. Will this work on such a new distribution?
I have seen an issue before where an internal sata disk would slow down, but an external usb disk ran full speed on an old machine. The reason ended up being that the internal sata bus was powered by the internal power supply that was developing a problem, and the usb drive was powered separately, so it was unaffected. I would check your /var/log/messages where it prints out the sata link speed established and make sure you are getting the full speed (you know 3/6 Gbps whatever your sata speed is, similarly for UDMA) or if you are getting messages about the bus getting reset after errors and configured to a slower speed to try to fix the problem.
You can try an older kernel, but I wouldn't go older than the minimum version that glibc was compiled with. It looks like slackware 15.0 will require a minimum of 2.6.32, but that is just one rule. There might be some userspace program, like one required during boot that also might break. But I guess it wouldn't hurt just to try whatever you had last working. I know that slackware 15.0 will still work with the 4.4.x series from slackware 14.2. You have older hardware, so your drivers would be expected to still work.
I have seen an issue before where an internal sata disk would slow down, but an external usb disk ran full speed on an old machine. The reason ended up being that the internal sata bus was powered by the internal power supply that was developing a problem, and the usb drive was powered separately, so it was unaffected. I would check your /var/log/messages where it prints out the sata link speed established and make sure you are getting the full speed (you know 3/6 Gbps whatever your sata speed is, similarly for UDMA) or if you are getting messages about the bus getting reset after errors and configured to a slower speed to try to fix the problem.
You can try an older kernel, but I wouldn't go older than the minimum version that glibc was compiled with. It looks like slackware 15.0 will require a minimum of 2.6.32, but that is just one rule. There might be some userspace program, like one required during boot that also might break. But I guess it wouldn't hurt just to try whatever you had last working. I know that slackware 15.0 will still work with the 4.4.x series from slackware 14.2. You have older hardware, so your drivers would be expected to still work.
Thanks for the reply.
I just checked /var/log/messages. ata1 is running at full speed of 1.5 Gbps.
Do you think this could be related to the kernel build? For example, missing a driver or a config option that ended up causing things to run at a lower speed? Recently i found out that i forgot to include the ATA SFF chipset drivers when i needed to use the built-in CD-ROM and it wouldn't work, and i saw that ATA SFF included support for ICH8 SATA. Excitedly i recompiled the kernel with the ATA SFF drivers, hoping that things would go back to normal, but nothing. Alternatively, could i have included a driver or config option that's somehow causing conflicts and causing the lower speed?
ADD: I grabbed the installers for kernel 2.6.37.6 from Slack 13.37. I'm having trouble compiling 2.6.39 on my stock gcc.
ADD: Well shit. I got the "FATAL: kernel too old" panic when i booted up 2.6.37.6.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.