Size increase of wheels since 3.27

13 views
Skip to first unread message

Michael Fischer

unread,
May 9, 2024, 1:16:12 PMMay 9
to DataStax Python Driver for Apache Cassandra User Mailing List
Hello,

It appears that the wheels for manylinux2014_x86_64.whl  and manylinux2014_aarch64.whl grew from ~ 3.7MB in the 3.26 release, to ~ 20.3MB in the 3.27 release, and staying close to that size ever since, while the packages for other systems have not grown anywhere near that much.

Unfortunately, this makes it difficult to e.g. stay within the size limits of an aws lambda.

Could you explain why this size increase happened (and only for those systems), and if there is anything we can do to reduce it? (preferably without sacrificing performance).

Thank you.

Bret McGuire

unread,
May 24, 2024, 6:42:55 PMMay 24
to DataStax Python Driver for Apache Cassandra User Mailing List, mfis...@grubhub.com
   Apologies, I've been working on other things and haven't made it back to this question.  But I did have a bit of time to take a look this afternoon and I'm pretty sure I know what's going on.

   The Python driver 3.27.0 release was the first one where we moved to cibuildwheel for wheel generation.  That brought with it an entire change in wheel build ecosystem which, of course, always has the possibility of introducing changes in behaviour.  We've already seen this in a different context.  It looks like something similar happened here.  In the 3.26.0 build the shared objects built by cython were stripped as part of the build process.  Starting with the 3.27.0 build that isn't the case, and the result appears to account for nearly all of the growth in size of the wheels:

stravinsky:/work/scratch/python-wheel-size/3.27$ cp cassandra/pool.cpython-38-aarch64-linux-gnu.so pool.cpython-38-aarch64-linux-gnu.so

stravinsky:/work/scratch/python-wheel-size/3.27$ strip pool.cpython-38-aarch64-linux-gnu.so 

stravinsky:/work/scratch/python-wheel-size/3.27$ ls -al pool.cpython-38-aarch64-linux-gnu.so

-rwxr-xr-x 1 mersault mersault 481328 May 24 16:42 pool.cpython-38-aarch64-linux-gnu.so

stravinsky:/work/scratch/python-wheel-size/3.27$ ls -al cassandra/pool.cpython-38-aarch64-linux-gnu.so

-rwxr-xr-x 1 mersault mersault 3862120 May  2  2023 cassandra/pool.cpython-38-aarch64-linux-gnu.so

stravinsky:/work/scratch/python-wheel-size/3.27$ ls -al ../3.26/cassandra/pool.cpython-38-aarch64-linux-gnu.so

-rwxr-xr-x 1 mersault mersault 481328 Mar 17  2023 ../3.26/cassandra/pool.cpython-38-aarch64-linux-gnu.so


   I've filed PYTHON-1387 to dig into this a bit more.  I'm cautiously optimistic that this should be something we can fix pretty readily.

   Thanks for the report!

  - Bret -

Michael Fischer

unread,
May 27, 2024, 5:11:15 PMMay 27
to DataStax Python Driver for Apache Cassandra User Mailing List, Michael Fischer
Thanks for the explanation and the update. I look  forward to hearing where this goes.
Reply all
Reply to author
Forward
0 new messages