News for hackers. Stuff that matters.
Re:Playing with Bolt and Postgres by Avamander on Saturday October 05, 2024 @05:51PM (#41753214)
How easy would it be to have an entire distro (re)built with BOLT? Say for example Gentoo?
Re:Playing with Bolt and Postgres by fishgoesblub on Saturday October 05, 2024 @05:55PM (#41753240)
It would be difficult as every package/program would need a step to generate the profile data by executing and running the program like the user would.
Re:Playing with Bolt and Postgres by metadat on Saturday October 05, 2024 @06:45PM (#41753462)
Is it theoretically possible to perform the profile generation+apply steps dynamically at runtime?
Re:Playing with Bolt and Postgres by cryptonector on Saturday October 05, 2024 @08:09PM (#41753773)
It would be hard to trust the result.
Re:Playing with Bolt and Postgres by tjalfi on Saturday October 05, 2024 @08:56PM (#41753953)
I wouldn't want to support it, but similar things have been done before.

Alexia Massalin's Synthesis[0] (pdf) operating system did JIT-like optimizations for system calls. Here's a LWN article[1] with a summary. Anyone who's interested in operating systems should read this thesis.

HP's Dynamo[2] runtime optimizer did JIT-like optimizations on PA-RISC binaries; it was released in 2000. DynamoRIO[3] is an open source descendant. Also, DEC had a similar tool for the Alpha, but I've forgotten the name.

[0] https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...

[1] https://lwn.net/Articles/270081/

[2] https://dl.acm.org/doi/pdf/10.1145/349299.349303

[3] https://dynamorio.org/

Re:Playing with Bolt and Postgres by EvanAnderson on Sunday October 06, 2024 @12:06AM (#41754666)
Nat Freidman developed "GNU Rope"[1] from 1998 which, if memory serves, was inspired by a tool that did the same thing in IRIX (cord, I believe).

[1] http://lwn.net/1998/1029/als/rope.html

Re:Playing with Bolt and Postgres by hikarikuen on Saturday October 05, 2024 @10:41PM (#41754345)
This is getting way outside the traditional compiler model, but I believe the .NET JIT has been adding more support for this in the last couple versions. One aspect of it is covered at https://devblogs.microsoft.com/dotnet/performance-improvemen...
Re:Playing with Bolt and Postgres by pgaddict on Sunday October 06, 2024 @04:01AM (#41755574)
I wonder if some JIT systems already do that / might be extended in that direction.
Re:Playing with Bolt and Postgres by genewitch on Sunday October 06, 2024 @01:50AM (#41755047)
based on what "fishgoesblub" commented, building - read: `emerge -e @world` - a gentoo system with profiling forced, and then using it in that "degraded" state for a while ought to be able to inform PGO, right? if there's a really good speedup from putting hot code together, the hottest code after moderate use should suffice to speed up things, and this could continually be improved.

I'm also certain that if there were a way to anonymously share profiling data upstream (or to the maintainers), that would decrease the "degradation" from the first step, above. I am 100% spitballing here. I'm a dedicated gentoo sysadmin, but i know only a small bit about optimization of the sort being discussed here. So it is possible that every user would have to do the "unprofiled profiler" build first, which, if one cares, is probably a net negative to the planet, unless the idea pans out, then it's a huge positive for the planet - man hours, electricity, wear/endurance on parts, etc.