samba-bugs at samba.org
2009-Nov-09 18:52 UTC
DO NOT REPLY [Bug 6881] New: --bwlimit option uses KiB/s, but is documented as (what amounts to) kB/s
https://bugzilla.samba.org/show_bug.cgi?id=6881
Summary: --bwlimit option uses KiB/s, but is documented as (what
amounts to) kB/s
Product: rsync
Version: 3.1.0
Platform: All
OS/Version: All
Status: NEW
Severity: trivial
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: rlaager at wiktel.com
QAContact: rsync-qa at samba.org
The --bwlimit option seems to use KiB/s, as io.c's sleep_for_bwlimit()
function
divides by 1024. It's documented as "KBPS", "KBytes per
second", and "kilobytes
per second".
I'm going to attach a patch which standardizes all of this as KiB/s and
"kibibytes per second", to match the actual usage.
Given that this is a network transfer rate, it'd be more proper (and
consistent
with other applications) to change the function to work in SI kilobytes per
second (i.e. use 1000 instead of 1024), but that's backwards-incompatible.
If
you'd like to go this route, I can prepare a patch to that effect.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2009-Nov-09 18:54 UTC
DO NOT REPLY [Bug 6881] --bwlimit option uses KiB/s, but is documented as (what amounts to) kB/s
https://bugzilla.samba.org/show_bug.cgi?id=6881 ------- Comment #1 from rlaager at wiktel.com 2009-11-09 12:54 CST ------- Created an attachment (id=4934) --> (https://bugzilla.samba.org/attachment.cgi?id=4934&action=view) A patch to change the documentation to use "KiB/s" and "kibibytes per second". -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Jamie Lokier
2009-Nov-09 19:05 UTC
DO NOT REPLY [Bug 6881] New: --bwlimit option uses KiB/s, but is documented as (what amounts to) kB/s
samba-bugs at samba.org wrote:> Given that this is a network transfer rate, it'd be more proper (and > consistent with other applications) to change the function to work > in SI kilobytes per second (i.e. use 1000 instead of 1024), but > that's backwards-incompatible. If you'd like to go this route, I can > prepare a patch to that effect.I agree, SI kilobytes are more appropriate for network transfer rates. I doubt if anyone seriously depends on the 2.4% difference or even noticed it, and would encourage changing the code to SI kilos rather then the documentation to kibis. -- Jamie
samba-bugs at samba.org
2009-Nov-13 08:10 UTC
DO NOT REPLY [Bug 6881] --bwlimit option uses KiB/s, but is documented as (what amounts to) kB/s
https://bugzilla.samba.org/show_bug.cgi?id=6881
wayned at samba.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #2 from wayned at samba.org 2009-11-13 02:10 CST -------
I've both improved the docs and improved the option to be able to accept the
same unit suffixes that are accepted by --max-size and --min-size. This makes
it clearer what --bwlimit=1000 is doing, and allows someone to specify
--bwlimit=1000kb (aka --bwlimit=1mb) for a slightly lower transfer limit than
--bwlimit=1MiB.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.