bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22180: Partition alignment using parted


From: Ankur Tank
Subject: bug#22180: Partition alignment using parted
Date: Sat, 2 Jan 2016 15:27:06 +0000

Hi Phillip,

Finally I could achieve optimal alignment for all partitions except initial 3 
partition(which I can't change).
Except initial 3 SPL partitions i have changed minimum partition size to 1MiB 
and now parted complains about alignment for only initial 3 partitions.
I have updated below Stackexchange post with latest script,
http://unix.stackexchange.com/questions/248939/how-to-achieve-optimal-alignment-for-emmc-partition

However I am not clear with one simple thing, that is,
Why parted behaves different when I give partition size in KiB and MiB?

I have to create partition with size in KiB i have to give end as (end -1) e.g.

parted --script -a optimal /dev/mmcblk0 \
  mklabel gpt \
  mkpart primary 128KiB 255KiB \
  mkpart primary 256KiB 383KiB \
  mkpart primary 384KiB 511KiB \
Observe end argument in all 3 partitions they are 256-1, 384-1 and 512-1

However if I have to give size in MiB parted allows me to use exact 1 MiB 
boundry,

parted --script -a optimal /dev/mmcblk0 \
  mklabel gpt \
  mkpart primary 128KiB 255KiB \
  mkpart primary 256KiB 383KiB \
  mkpart primary 384KiB 511KiB \
  mkpart primary 1MiB 2MiB \
  mkpart primary 2MiB 3MiB \
  mkpart primary 3MiB 4MiB \

Observe last three partitions, end of the one partition is the beginning of the 
second partition in case size mentioned in MiB which is not possible if size is 
given in KiB.
Why is that, any suggestions/pointers for that ?

Thank you for all help,

Regards,
Ankur
________________________________________
From: Phillip Susi address@hidden
Sent: Saturday, December 26, 2015 7:08 AM
To: Ankur Tank; address@hidden
Cc: address@hidden
Subject: Re: bug#22180: Partition alignment using parted

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 12/24/2015 05:51 AM, Ankur Tank wrote:
> Thank you for replying Phillip, 1. How do we measure performance
> improvement before and after partition alignment ?

hdparm -t or dd between the drive and /dev/null or /dev/zero and the
drive ( for a destructive write test ).


> 2. By above question, I meant, are there any tools/utilities
> available which would suggest partition alignment parameters(e.g.
> how many blocks current partition can be moved to get alignment) ?

Not that I am aware of but it is simply a matter of dividing the
current start position by the desired alignment and seeing if you get
a remainder or fractional result.

parted's align-check command does this, but simply answers with a
yes/no as to whether it is aligned instead of how far off it is.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCgAGBQJWfe+vAAoJEBB5UWFcu6UWcnwH/0Ft7FnlqG3z8WgPyxw/hjtP
B6mf9fyPod/XlExE5YioAMIY/mj7u4AwYBHqvRsr7GqhIxc3PNdT31i1gfwi/khp
sC+nJj39ShBp3C313MyRm9wbUQgMs88qXQAJWjQwRNs/suWyaSodOAzCsJ96aD0D
xiT/9T8s4l3eXSGMeutFCtTRkFh8csOrQTO39Pq6es1uVoZd1fR3VC+HMwfyqt72
CDWhm2EAiAuNBYZ8g0LpD2WLqrh0ZHqui2svLnEZATpc1GsreZyc8jUNDZ9EXFs6
rfQXVXTQqXAHOkQCfF9tD9mLsKUOBN0yDkbl9Zb95gqPRjbqnqEeWq+iWsdSynI=
=GLJ8
-----END PGP SIGNATURE-----
L&T Technology Services Ltd

www.LntTechservices.com<http://www.lnttechservices.com/>

This Email may contain confidential or privileged information for the intended 
recipient (s). If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]