Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Growing asset size #2396

Closed
greg0ire opened this issue Nov 29, 2023 · 4 comments
Closed

[Bug]: Growing asset size #2396

greg0ire opened this issue Nov 29, 2023 · 4 comments
Labels
🐛 bug Something isn't working

Comments

@greg0ire
Copy link

Bug report

It looks like the assets in the release are getting bigger and bigger.
In https://github.com/DataDog/dd-trace-php/releases/tag/0.85.0, they're 30Mb to 60Mb. In https://github.com/DataDog/dd-trace-php/releases/tag/0.94.0, there are 100 extra Mb

Looking at what's on disk after installing a package, I can see this:

/opt/datadog-php/extensions:
total 86M
-rwxr-xr-x 1 root root 2.5M Apr  5  2023 ddtrace-20151012-alpine.so
-rwxr-xr-x 1 root root 2.1M Apr  5  2023 ddtrace-20151012-debug.so
-rwxr-xr-x 1 root root 2.8M Apr  5  2023 ddtrace-20151012-zts.so
-rwxr-xr-x 1 root root 3.0M Apr  5  2023 ddtrace-20151012.so
-rwxr-xr-x 1 root root 2.5M Apr  5  2023 ddtrace-20160303-alpine.so
-rwxr-xr-x 1 root root 2.2M Apr  5  2023 ddtrace-20160303-debug.so
-rwxr-xr-x 1 root root 2.8M Apr  5  2023 ddtrace-20160303-zts.so
-rwxr-xr-x 1 root root 3.0M Apr  5  2023 ddtrace-20160303.so
-rwxr-xr-x 1 root root 2.5M Apr  5  2023 ddtrace-20170718-alpine.so
-rwxr-xr-x 1 root root 2.2M Apr  5  2023 ddtrace-20170718-debug.so
-rwxr-xr-x 1 root root 2.8M Apr  5  2023 ddtrace-20170718-zts.so
-rwxr-xr-x 1 root root 3.0M Apr  5  2023 ddtrace-20170718.so
-rwxr-xr-x 1 root root 2.5M Apr  5  2023 ddtrace-20180731-alpine.so
-rwxr-xr-x 1 root root 2.2M Apr  5  2023 ddtrace-20180731-debug.so
-rwxr-xr-x 1 root root 2.9M Apr  5  2023 ddtrace-20180731-zts.so
-rwxr-xr-x 1 root root 3.1M Apr  5  2023 ddtrace-20180731.so
-rwxr-xr-x 1 root root 2.6M Apr  5  2023 ddtrace-20190902-alpine.so
-rwxr-xr-x 1 root root 2.3M Apr  5  2023 ddtrace-20190902-debug.so
-rwxr-xr-x 1 root root 2.9M Apr  5  2023 ddtrace-20190902-zts.so
-rwxr-xr-x 1 root root 3.1M Apr  5  2023 ddtrace-20190902.so
-rwxr-xr-x 1 root root 2.6M Apr  5  2023 ddtrace-20200930-alpine.so
-rwxr-xr-x 1 root root 2.3M Apr  5  2023 ddtrace-20200930-debug.so
-rwxr-xr-x 1 root root 3.0M Apr  5  2023 ddtrace-20200930-zts.so
-rwxr-xr-x 1 root root 3.2M Apr  5  2023 ddtrace-20200930.so
-rwxr-xr-x 1 root root 2.7M Apr  5  2023 ddtrace-20210902-alpine.so
-rwxr-xr-x 1 root root 2.4M Apr  5  2023 ddtrace-20210902-debug.so
-rwxr-xr-x 1 root root 3.1M Apr  5  2023 ddtrace-20210902-zts.so
-rwxr-xr-x 1 root root 3.3M Apr  5  2023 ddtrace-20210902.so
-rwxr-xr-x 1 root root 2.7M Apr  5  2023 ddtrace-20220829-alpine.so
-rwxr-xr-x 1 root root 2.4M Apr  5  2023 ddtrace-20220829-debug.so
-rwxr-xr-x 1 root root 3.2M Apr  5  2023 ddtrace-20220829-zts.so
-rwxr-xr-x 1 root root 3.4M Apr  5  2023 ddtrace-20220829.so

What are all these files and do they actually all need to end up in the assets?

PHP version

8.2.12

Tracer or profiler version

0.94.0

Installed extensions

No response

Output of phpinfo()

No response

Upgrading from

No response

@greg0ire greg0ire added the 🐛 bug Something isn't working label Nov 29, 2023
@bwoebi
Copy link
Collaborator

bwoebi commented Jan 4, 2024

Hey @greg0ire,

these files are the individual compiled artifacts for nts, debug, zts and alpine+nts on PHP 7.0 to 8.3.
So, many versions plus many targets equals many megabytes :-/

We also recently added rust to our codebase, which led to the files getting bigger.

You generally just need exactly one of all these files, but we're providing them all for all the different configurations of PHP existing.

@greg0ire
Copy link
Author

greg0ire commented Jan 4, 2024

Ok , we've found a workaround so feel free to close this, unless you think it might be worth working on producing several distinct packages, for instance one per PHP version

@morrisonlevi
Copy link
Collaborator

Can you speak a bit more directly to what your concern was? The datadog-setup.php script will download a tar package based on the platform it's on, and install the relevant pieces, and not keep the downloaded files around. So the final size on disk contains only what it needs. Now, in the interim, it does download and extract an archive that is growing over time, so there's definitely room for improvement. But any improvements should be made with more focused goals, so that's why I'm wondering what your concern was more specifically.

@greg0ire
Copy link
Author

greg0ire commented Jan 5, 2024

TIL about datadog-setup.php. We've written our install script long before that installer was documented in DataDog/documentation@d3a4d08, so I guess that is the root cause. We should work on switching to it. Closing, then.

@greg0ire greg0ire closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants