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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-20-2020, 01:34 AM
|
#1
|
Member
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43
Rep:
|
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.
|
|
|
05-20-2020, 02:19 AM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414
|
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.
|
|
|
05-20-2020, 04:05 AM
|
#3
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,485
|
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)?
|
|
|
05-20-2020, 05:04 AM
|
#4
|
Member
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
05-20-2020, 05:14 AM
|
#5
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,485
|
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).
|
|
|
05-20-2020, 05:22 AM
|
#6
|
Member
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
05-20-2020, 05:28 AM
|
#7
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by Lixt
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.
|
05-20-2020, 05:40 AM
|
#8
|
Member
Registered: Oct 2011
Location: Russia
Distribution: Debian 11, amd64, KDE
Posts: 43
Original Poster
Rep:
|
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).
|
|
|
All times are GMT -5. The time now is 10:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|