[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-20 Thread Oleksij Rempel
Hi Julian, I would suggest to rewords you initial comments to some thing like: "apt was heavy reworked and optimised, probably your initial problem won't hit you as hard as before. Hashing optimisation can't currently be done for this release without braking the ABI." Any way, thank you for

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
Of course you don't have a CPU bottleneck with curl, it does not run 3 or 4 hashes over everything it downloads. APT needs to hash its downloads to ensure they are secure, and it uses all available hashes to do so, so if one hash's security is compromised, we can still hopefully still rely on the

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Travis Johnson
This seems to be a bit of a bikeshed on specific implementation options. The problem here is downloads pin the CPU, and in my personal experience I can download the same files via curl with nothing close to a CPU bottleneck. I do not know how you benchmarked APT but this may be a case of a micro

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
Tests run (for SHA256, add SHA512 as needed): (1) time for i in md5 sha1 sha256; do nettle-hash -a $i < /tmp/test ; done (2) time for i in md5 sha1 sha256; do openssl $i < /tmp/test ; done (3) ./a.out < /tmp/test where a.out is #include #include int main(void) { Hashes h(Hashes::MD5SUM

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
New results (user time only, removing read() overhead): OpenSSL: 6.8s or 9.8s = 147 or 102 MB/s = 1176 or 816 Mbit/s Nettle: 8.8s or 11.8s = 113 MB/s or 85 MB/s = 904 or 680 Mbit/s APT: 10.9s or 15s = 92 MB/s or 67 MB/s = 736 or 536 Mbit/s As we can see, the improvement is not that

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
I think my laptop is too old to support AVX, though. But I'm not sure if libnettle supports that anyway, and libnettle would be our choice. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu.

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
We can't use openssl for legal reasons, and also don't want it in libapt-pkg for technical reasons anyway. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1123272 Title: high

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
Results from my 5 year old laptop (X230, Core i5-3320M with 2.6 GHz), for a 1 GB file: MD5+SHA1+SHA256: 11s => 90 MB/s => 727 Mbit/s MD5+SHA1+SHA256+SHA512: 15s => 67 MB/s => 533 Mbit/s That seems like an acceptable baseline performance. You are not likely to hit GBs worth of packages, so you

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Travis Johnson
I am not satisfied with this response: I experience CPU bottlenecking on ec2 server instances. Gigabit networking with CPUs sub-3ghz is incredibly common place (read: entirety of server ecosystem), so I'm not sure what you mean by "usual" network bandwidths. -- You received this bug notification

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Oleksij Rempel
Well, definition of "extreamly" is wired. In this bug report we have i5 with 20%! I my case it was Intel Atom with 100% CPU usage and DSL 2000 Mbit/s! Atom is slow, but not slowest used CPU. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2017-07-18 Thread Julian Andres Klode
The hash algorithms should be fast enough these days in software to handle usual network bandwidths. If you combine extremely high speeds with extremely slow CPUs, that's of course suboptimal. We can consider using libnettle at some point, I assume this might give a nice speed up, but this is

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2016-08-03 Thread dino99
** Tags removed: raring vivid ** Tags added: xenial -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1123272 Title: high cpu usage on download (not optimised SHA256, SHA512,

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2016-08-03 Thread Travis Johnson
I believe this is still present in 16.04. Specifically I become CPU bottlenecked (100% on one core by /usr/lib/apt/methods/http) when downloading packages within AWS EC2 instances (better bandwidth with download servers there). Besides the issues around locking up a core, this makes several

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2015-01-09 Thread Alberto Salvia Novella
** Changed in: apt (Ubuntu) Importance: Undecided = Medium -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1123272 Title: high cpu usage on download (not optimised SHA256,

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2015-01-09 Thread dino99
also get that issue on Vivid i386; mainly when the index is rebuilt when using synaptic ** Tags added: vivid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1123272 Title:

[Touch-packages] [Bug 1123272] Re: high cpu usage on download (not optimised SHA256, SHA512, SHA1)

2015-01-09 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: apt (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu.