Date: Sun, 28 Feb 2021 11:18:46 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 253905] databases/mysql80-server excessive free storage requirements for building from source Message-ID: <bug-253905-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253905 Bug ID: 253905 Summary: databases/mysql80-server excessive free storage requirements for building from source Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: joneum@FreeBSD.org Reporter: viktor.stujber+freebsd-bugs_v4CCPfay@gmail.com Assignee: joneum@FreeBSD.org Flags: maintainer-feedback?(joneum@FreeBSD.org) mysql-server at this point requires 1GB of storage to build via portmaster, multiple times more than any other software I'm using. And from what I've observed, it's not due to the inherent complexity of the source code, but d= ue to compounding inefficiencies in the build process. The distfile 'mysql-boost-8.0.23.tar.gz' is 278 MB. (mysql-5.5.62.tar.gz size is 20 MB.) The extracted source tree is 810 MB. (From that, the mysql-test/ directory is 516 MB.) The intermediate .build/ directory, without tests, is 947 MB. The stage/ directory is another 177 MB. In total, the required free storage is no less than 2212 MB, to produce a 1= 77 MB package - a 12.5 : 1 ratio. Back in the mysql 5.x days, it was possible = to fit the whole build, distfile included, onto a 1 GB tmpfs. Perhaps it would= be worthwhile to get closer to that kind of number. Here are my observations. The ports makefile currently has no options. One of them could be to disable tests. I did not find any direct knob in their cmakefile that would do that, but patching it out is easy. That in turn allows having a post-extract step delete the mysql-test subdirectory for immediate savings of ~516 MB. The build process generates intermediate .o files and resulting executables/libraries for the entire source tree without any cleanup steps inbetween. That is, even though the results are already built, it still kee= ps the temporary stuff around. And it does in fact require them to be there - = they will be recompiled if missing, even though all the outputs have already been built. If the build system instead cleaned its temporary files when they we= re no longer needed, and did not require them once the corresponding outputs w= ere built, that would save ~200 MB. When the build completes and the files are staged for installation, the sta= ging is done via copying. It might be possible to do this via symlinks during staging, and then resolving them during install. This would save another ~1= 77 MB. I understand that these ideas may not be compatible with how freebsd and my= sql currently does builds, and changes could require upstream cooperation. I ju= st figured I'd write this to give this issue (or non-issue?) a bit of attentio= n. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253905-7788>