Live data from Hacker News

Make Ubuntu packages 90% faster by rebuilding them

gist.github.com

181–190 of 375 posts

Re: Make Ubuntu packages 90% faster by rebuilding them

#181

Earlier quoted context omitted.

I assume people downvoted it because “ASLR obscures the memory layout. That is security by obscurity by definition” is just wrong (correct description here: https://news.ycombinator.com/item?id=43408039 ). It does say [flagged] too, though, so maybe that’s not the whole story…?

No, that other definition is the incorrect one. Security by obscurity does not require that the attacker is ignorant of the fact you're using it. Say I have an IPv6 network with no firewall, simply relying on the difficulty of scanning the address space. I think that people would agree that I'm using security by obscurity, even if the attacker somehow found out I was doing this. The correct definition is simply "usin…

  > The correct definition is simply "using obscurity as a security defense mechanism", nothing more.
Also stated as "security happens in layers", and often obscurity is a very good layer for keeping most of the script kiddies away and keeping the logs clean.

My personal favorite example is using a non-default SSH port. Even if you keep it under 1024, so it's still on a root-controlled port, you'll cut down the attacks by an order of magnitude or two. It's not going to keep the NSA or MSS out, but it's still effective in pushing away the common script kiddies. You could even get creative and play with port knocking - that keeps under-1024 ports logs clean.

Re: Make Ubuntu packages 90% faster by rebuilding them

#182
post #163

Earlier quoted context omitted.

I'd like to bring attention to the ALHP repos[1]. These are the Arch packages built for x86-64-v2, x86-64-v3 and x86-64-v4, which are basically names for different sets of x86-64 extensions. Selecting the highest level supported by your processor should get you most of the way to -march=native, without the hassle of compiling it yourself. It also enables -O3 and LTO for all packages. [1]: https://github.com/an0nfunc/…

Nice, I'll try them out! LTO is great, but I have my doubts about -O3 (vs the more conservative -O2). UPDATE: bah, ALHP repos don't support the nvidia drivers. And I don't want to muck around with setting everything up again. Another update: I moved to nvidia-open, so now I can try the suggested repos.

All in under 2 hours. You were totally nerd-sniped.

Re: Make Ubuntu packages 90% faster by rebuilding them

#184
post #59

Earlier quoted context omitted.

Are you arguing that ASLR is “security via obscurity”?

I would, and there is no shame in it, as far as I'm concerned. I don't need to outrun the bear. I just need to outrun you.

it’s a total distortion of what the phrase means.

Security through obscurity is when you run your sshd server on port 1337 instead of 22 without actually securing the server settings down, because you don’t think the hackers know how to portscan that high. Everyone runs on 22, but you obscurely run it elsewhere. “Nobody will think to look.”

ASLR is nothing like that. It’s not that nobody thinks to look, it’s that they have no stable gadgets to jump to. The only way to get around that is to leak the mapping or work with the handful of gadgets that are stable. It’s analogous to shuffling a deck of cards before and after every hand to protect against card counters. Entire cities in barren deserts have been built on the real mathematical win that comes from that. It’s real.

Re: Make Ubuntu packages 90% faster by rebuilding them

#186
post #26

I’m almost more amazed that someone figured out jq’s syntax and got some use out of it. In all seriousness though, are you sure some of this isn’t those blocks being loaded into some kind of file system cache the second and third times? How about if you rebooted and then ran the mimalloc version?

I think jq's syntax is pretty sweet, once you get used to it (or are already familiar with point-free style, as it's in Haskell). The man page is subpar, however.

Re: Make Ubuntu packages 90% faster by rebuilding them

#188
post #163

Earlier quoted context omitted.

I'd like to bring attention to the ALHP repos[1]. These are the Arch packages built for x86-64-v2, x86-64-v3 and x86-64-v4, which are basically names for different sets of x86-64 extensions. Selecting the highest level supported by your processor should get you most of the way to -march=native, without the hassle of compiling it yourself. It also enables -O3 and LTO for all packages. [1]: https://github.com/an0nfunc/…

Nice, I'll try them out! LTO is great, but I have my doubts about -O3 (vs the more conservative -O2). UPDATE: bah, ALHP repos don't support the nvidia drivers. And I don't want to muck around with setting everything up again. Another update: I moved to nvidia-open, so now I can try the suggested repos.

You should be able to use the regular arch repos as a fallback (and even repos from alhp with a lower feature level https://somegit.dev/ALHP/ALHP.GO/issues/255#issuecomment-333...)

doing this should allow you to use as many optimized packages as possible while still being able to install packages not supported by the alhp

Re: Make Ubuntu packages 90% faster by rebuilding them

#189
post #86

Earlier quoted context omitted.

> Gentoo linux is essentially made specifically for people like this, to be able to optimize one’s own linux rig for one’s specific usecase. That's true but worth noting that "optimize" here doesn't necessarily refer to performance. I've been using Gentoo for 20 years and performance was never the reason. Gentoo is great if you know how you want things to work. Gentoo helps you get there.

If it wasn't for performance, what was gained in using it over something like Slackware and building only the packages you needed to?

USE flags. You can build packages with specific features enabled or disabled, which can further reduce your dependency tree.

Re: Make Ubuntu packages 90% faster by rebuilding them

#190
He is still missing profile guided optimizations (with his testcase), and bolt.

And in some/most cases -Os is faster than -O3

Boehm GC is usually slower than glibc with lots of allocs. MPS would be better, but needs lots of rewriting. https://github.com/Ravenbrook/mps

Post reply on HN