1

I referred Compiling vs using pre-built binaries performance?. The post talks about performance and opportunities for optimization.

My question is about reliability.

I built both python and postgresql from source and they are running good on my development machine. I am planning to do the same in the production environment.

Is compiling for production the same as compiling for development environment?

If not, what are the precautions I need to take?

3

There are several tradeoffs you've made that are not immediately obvious.

By running your own builds, you're responsible for keeping track of upstream updates, particularly with regard to security.

You're also suspectible to changes in your environment that would've been handled in distribution packages, but you again have to monitor and re-integrate such modifications.

The onus is also on you to verify that your own binaries work as they should on the target platform, particularly if you've used more aggressive build settings.

Unless there are clear advantages for you (needing newer versions than the distro, site patches needed, lack of connectivity/trust), there is very little to gain from building from source yourself.

0

There are significant risks if you build your own package. You will need to track upstream changes and keep up to date. (Otherwise you will miss security, functionality, and optimization changes.)

Rather than build on the production server, build on the the development server and package the software for installation on the production server. For many distributions, you can download the package source and build your own distribution package. Do this on your development server and deploy to production.

While there are possible opportunities for optimization. It has been my experience many optimizations actually slow performance. You need the same hardware for development and production if you are building and testing your own packages. (Several factors can cause optimizations that work in development to fail in production and vise versa.)

If you really need a newer version in production, check for a backport version. Even if a backport is not available, it may be possible to deploy the package from a newer OS release in the current environment. This would be safer than build your own. You would need to monitor the distribution for updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.