LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2023, 11:10 PM   #16
reb0rn
LQ Newbie
 
Registered: Sep 2023
Posts: 12

Original Poster
Rep: Reputation: 0

I copied files to empty HDD so they start from from HDD start and are 100% saved one after other, and as read-ahead helped me a lot i can say it defo work, I might test in real use next week with 64MB buffer and see speed and compare vs 32MB
I have already set cluster size as 32 and 64MB but that have not helped me at all, but it will stay as its done
 
Old 12-05-2023, 12:08 AM   #17
lvm_
Member
 
Registered: Jul 2020
Posts: 984

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
Originally Posted by reb0rn View Post
I copied files to empty HDD so they start from from HDD start and are 100% saved one after other
I won't bet on that, disk allocation strategy may be weird. But you may check this with 'hdparm --fibmap'
 
Old 12-05-2023, 12:21 AM   #18
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
yes, if you look at how ext4 allocates blocks, you will be surprised. Otherwise it is optimized for a multi-user, multi-task environment (parallel access to a lot of small files), not for a single file access.
https://www.kernel.org/doc/html/late...xt4/index.html
 
Old 12-06-2023, 03:40 AM   #19
reb0rn
LQ Newbie
 
Registered: Sep 2023
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lvm_ View Post
I won't bet on that, disk allocation strategy may be weird. But you may check this with 'hdparm --fibmap'
its quite fine as i minitor disk read and HDD is 16TB only ~3.5T stored and it has max speed on read for that part, it do go from 210 to 250B/s on 7TB used but speed at offset 8TB+ is under 200MB/s on 3th HDD
one file:
filesystem blocksize 4096, begins at LBA 2048; assuming 512 byte sectors.
byte_offset begin_LBA end_LBA sectors
0 4310435840 4310697983 262144
134217728 4310697984 4318824447 8126464

At first I had data saved over network in multiple tasks and then it was mess (read time would take over 50% more), files where on end of disk even if less then 50% space used, but cp or mv them from disk1 to disk2 helped, at least when I format 2nd hdd to be sure

Last edited by reb0rn; 12-06-2023 at 03:43 AM.
 
Old 12-06-2023, 04:18 AM   #20
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
I just don't understand, you tried a lot of things, but why don't you use ssd, and you can have much better results.
 
Old 12-06-2023, 11:58 AM   #21
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,767

Rep: Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765
Quote:
Originally Posted by pan64 View Post
I just don't understand, you tried a lot of things, but why don't you use ssd, and you can have much better results.
Great point.

The thing is that you cannot optimize a file system for parallel operation, because that is not how the hardware works. You can tune for best performance OF THE SYSTEM for your use case, but the real optimization is to make the hardware fit the intended function. To optimize for parallel I/O you need a storage controller and channels that can operate in parallel, or multiple controllers: and in any case accessing multiple storage devices that can be read independently and in parallel.

If you are not willing to modify the hardware, you are only tuning the software and system for the optimal performance THAT HARDWARE can achieve under that kind of use given your restrictions. (Which is still not a bad thing to do and may be sufficient for your needs. One can hope.)

Getting access that APPEARS parallel is achieved by loading as much as possible from the slow (nonparallel rotating rust) storage into faster and more parallel (ram) storage. That is not achieved by changes directly to the file system, although a file system with good performance certainly helps. Changes to how you load from storage into ram cache and buffers makes a bigger difference, and of course there must be more than adequate ram to hold all of the data you need to access in parallel.

Were I building a system for this kind of operation, it would involve a stack of 7 to 12 SSD devices on multiple channels in a RAID-5 array, because that would give you the fastest parallel performance.I would have to sit down and do the math on the memory, but twice what it would take to hold all of the buffered data would be a base, then operational memory atop that, and about 20% for spare to reduce swapping. A smart engineer would then double that. (Compared to production impact, even expensive ram is cheap!)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How I optimized my drive setup (HDD vs SSD) MirceaKitsune Linux - Hardware 5 04-16-2020 06:40 PM
LXer: Nvidia and ARM: It's a parallel, parallel, parallel world LXer Syndicated Linux News 0 03-21-2013 06:10 PM
ext3 performance -- very large number of files, large filesystems, etc. td3201 Linux - Server 5 11-25-2008 09:28 AM
LXer: This week at LWN: Large pages, large blocks, and large problems LXer Syndicated Linux News 0 09-27-2007 11:40 AM
A very very very very big problem!! Elbryan Linux - Software 2 09-23-2005 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration