LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-20-2020, 01:34 AM   #1
Lixt
Member
 
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43

Rep: Reputation: 0
Question Physical location of logical partitions


I have a HDD Toshiba P300 2 Tb and I have 1 Tb of data to write into it. But only 50 Gb of that data is to be accessed by me regularly.
Is it true that if there were a logical partition for those 50 Gb, this whole partition would be located compactly on adjoining tracks? which would optimize the work of an HDD.
FS is ext4.
 
Old 05-20-2020, 02:19 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
Any physical partition, primary or logical, will occupy a single contiguous region on the disk. It matters not at all.
However the filesystem can only be the same size, or slightly less - in your case 50G say. The rest of the 1T of data would need to be on another partition/filesystem.
 
Old 05-20-2020, 04:05 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,485

Rep: Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052
it depends on a lot of things like: how do you access that data (is this a database, file[s], or ???), do you want only to read or write/alter/update/modify it (or add/delete records/files)? How often do you want to access it? How much RAM (cache) do you have?
Playing with partitions is not the best way to optimize it (also why do you want to optimize it at all)?
 
Old 05-20-2020, 05:04 AM   #4
Lixt
Member
 
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43

Original Poster
Rep: Reputation: 0
syg00
Yes. My question is if it is a good idea to divide HDD as 50Gb + 1950Gb. Or make a single 2000Gb partition.
I'd like to know if a separate 50Gb partition would be a continious space physically.

pan64
It's mostly small text and graphic files. They are mostly being written and deleted, sometimes modified. It usually happens from a few dozen times a day to a few hundred times a day.
I have 6 Gb RAM.
I want to optimize partitions (if possible) to have a quicker access to HDD and also to protect moving parts of HDD (as the heads) from unneeded deterioration.
 
Old 05-20-2020, 05:14 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,485

Rep: Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052Reputation: 8052
so if you use smaller amount of data than your RAM (in a day) HDD will not be used at all, because everything will be cached.
Optimizing partitions and protect moving parts will not give you significant improvement. Splitting your drives into smaller partitions also may lead to performance degradation.
Don't forget your system needs to read a lot of other files for the regular work (binaries, libraries, config files, scripts), so it is not that simple.
I would rather try to buy more RAM (if you want to speed up that host).
 
Old 05-20-2020, 05:22 AM   #6
Lixt
Member
 
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43

Original Poster
Rep: Reputation: 0
pan64, thanks.
My OS and all installed software are located on a different physical drive. That's where they load to RAM from.

Concerning the HDD in question, I write files there from Internet and those files are not cached on that HDD.

My system is very old and I hope to upgrade most of it some time.
 
Old 05-20-2020, 05:28 AM   #7
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by Lixt View Post
I'd like to know if a separate 50Gb partition would be a continious space physically.
As a partition is created from blocknumber XXXX to blocknumber YYYY it is contiguous in block numbers, But if that's physically contiguous too depends on the mapping your disk uses from block numbers to physical addresses on-disk. You cannot control that and with modern cached drives it really doesn't matter all that much.

BTW: this method is a limitation too: if you haven't got a range of 50GB of block numbers available, you cannot create a new partition OF that size. So if the disk is rather fragmented in partitions, you'd best start anew.

PS: on SSD disks logical block numbers can be all over the memory, they almost certainly are not physical contiguous.

Last edited by ehartman; 05-20-2020 at 05:30 AM.
 
1 members found this post helpful.
Old 05-20-2020, 05:40 AM   #8
Lixt
Member
 
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43

Original Poster
Rep: Reputation: 0
ehartman, thanks.
In this case the single partition seems to me the best option.

I remember having read somewhere that modern HDDs first write to those sectors which have the shortest access time. If it's true, it's probably worth writing the most often accessed files first (whe the HDD is still empty).
 
  


Reply

Tags
hdd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FATAL ERROR: Bad logical partition 7: enlarged logical partitions overlap stf92 Slackware 2 03-18-2016 06:43 PM
LXer: Google I/O Android News: Location, Location, Location (Plus Cloud Messaging and Bluetooth) LXer Syndicated Linux News 0 06-05-2013 01:00 PM
[SOLVED] cfdisk : FATAL ERROR: Bad logical partition 10: enlarged logical partitions overlap riller Fedora 8 05-31-2012 08:17 AM
Logical disks and physical location on Sparc dazdaz Solaris / OpenSolaris 2 09-11-2007 09:52 AM
location, location, location! mermxx LQ Suggestions & Feedback 9 09-25-2004 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:31 AM.

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