[CLOSED] Tuning HDD writes?

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[CLOSED] Tuning HDD writes?

Postby rychok » May 21st, '22, 23:52

On my main computer I'm on odd releases of the system, mostly because of VMware, to make sure modules are compiling, therefore few months back I have upgraded from MGA 5 to MGA 7, actually it was fresh install.
Besides problem with Nvidia - installer had seen card and installed the driver but was not able to remove Nouveau active driver - everything looked fine. This is the desktop computer with only Nvidia card, mageia-prime command made the trick to load nvidia driver.
After using the system for a while I have few minor problem - some problem like kmail starting before other services causing filters not working correctly - and one a little bigger problem, that it looks like HDD write performance comparing to MGA5.
My system is loading from SSD drive but my home directory is on mirror RAID of 7200 Barracuda drives. Since there are some cache writes happens every minute, the feel of the system performance is sometimes terrible, mostly on close of some application. Closing console make takes around two seconds, typing in libreoffice is another thing, everytime it happens you will see hdd activity light on, but when you check the modified files is not really large amount of data being saved, but it feels like data is written in sync mode. Of course random access for SSD drive and ordinary drive are way different.
Telling the truth I'm not sure what I'm asking about, I couldn't trace the problem.
It could be RAID performance or async performance tuned to SSD, when ordinary drive random access will give you KB not MB per second.
At this point I'm thinking to make room for /home on my SSD drive and link other directories to RAID, therefore using SSD for all cache, and config files, unless someone knows how to solve this otherwise.
Last edited by rychok on Jul 19th, '22, 04:11, edited 1 time in total.
rychok
 
Posts: 59
Joined: Jul 9th, '13, 03:03

Re: Tuning HDD writes?

Postby Germ » May 22nd, '22, 00:38

Try hdparm

There is a man page and online instructions. Not sure if it works for SSD. I think it will, at least some settings

sdparm for SCSI devices
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 724
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA

Re: Tuning HDD writes?

Postby doktor5000 » May 22nd, '22, 11:04

Hi there, why not put your /home on the SSD? You're wasting a LOT of performance there.
I'd migrate /home to the SSD, and only add some dedicated mounts below /home/username for some folders where you may need a lot of additional space (if that's even the case).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Tuning HDD writes?

Postby rychok » May 22nd, '22, 23:43

Thank you for your response,
doktor5000, I've been thinking about that - last line in my original post. I'm just curious why I did not have this kind of issue with MGA5, and wandering if this is somehow permanent kernel tuning to write to disk in more sync way, base on accessibility of SSD drives - huge performance difference in random write, also if there is possibility to change this behavior by changing "vm" or "fs"or other kernel parameters - just for my knowledge.
I also remember times when users temp folder was in system /tmp directory, I might do this to config and cache for user and move them to SSD that way, probably putting home on SSD will be better.
rychok
 
Posts: 59
Joined: Jul 9th, '13, 03:03

Re: Tuning HDD writes?

Postby doktor5000 » May 23rd, '22, 17:24

Well, Mageia 5 shipped with kernel 3.19. Mageia 7, Mageia 7 shipped with kernel 5.1 - that's already a huge difference. The only global setting that you can easily adjust is the used I/O scheduler, which is a per-disk setting.
You can check the available and selected scheduler for disk sda with
Code: Select all
cat /sys/block/sda/queue/scheduler

See e.g. https://www.cloudbees.com/blog/linux-io ... ler-tuning for more details.
Easiest thing would be to switch to a different (e.g. none aka noop) scheduler for the RAID disk and see if behaviour changes.

Apart from that, /tmp should usually be a tmpfs, and hence will not be written on disk. And for users generally their /home/username/tmp will be used.


Also regarding your initial description of the issue, typing in libreoffice - ususally there should not be disk activity for that, unless you hit auto-correction and it has to lookup words.
In any case you'd have to check, what is actually being read/written to disk during such time. iotop is something which is made for that. iotop -o will only show thread/processes that are actually accessing the disk currently.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Tuning HDD writes?

Postby rychok » May 24th, '22, 01:45

At this moment it may look like some kind of driver/ hardware problem.
I guess I need make more tests, check how system will work without RAID, and maybe try different HDD brand.
System is still useable, sometimes feels like turbo charged car, need time to kick in, actually the worst performance is during pictures import in digikam, takes forever.
I have found one post about MGA7 using less memory for disk cache, I can see this also - usually less than 10% now,but when I'm running VMware the size is increasing to 83% - like used to be, and then system seems to work smoother.
rychok
 
Posts: 59
Joined: Jul 9th, '13, 03:03

Re: [CLOSED] Tuning HDD writes?

Postby rychok » Jul 19th, '22, 04:26

Just some update if someone will have similar problem.
I still do not know if reason for this poor system behavior is specific hardware, or changes the system is making writes to the disk (like combining them) in conjunction with mirror RAID setup for home directory.
At this point I have moved .cache, .local, and .config directories to system SSD drive creating links in my home directory. So far everything looks much better.
As far as downloading pictures by DigiKam the additional slowdown is from baloo service, disabling file search makes downloading back to normal.
rychok
 
Posts: 59
Joined: Jul 9th, '13, 03:03


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest