Most active commenters
  • pbhjpbhj(3)
  • gerdesj(3)

←back to thread

256 points BSDobelix | 37 comments | | HN request time: 1.517s | source | bottom
1. gausswho ◴[] No.42164371[source]
With this tool I am wary that I'll encounter system issues that are dramatically more difficult to diagnose and troubleshoot because I'll have drifted from a standard distro configuration. And in ways I'm unaware of. Is this a reasonable hesitation?
replies(6): >>42164481 #>>42164533 #>>42164535 #>>42164760 #>>42164990 #>>42168400 #
2. pbhjpbhj ◴[] No.42164481[source]
>"bpftune logs to syslog so /var/log/messages will contain details of any tuning carried out." (from OP GitHub readme)

The rmem example seems to allay fears that it will make changes one can't reverse.

replies(1): >>42164502 #
3. admax88qqq ◴[] No.42164502[source]
It’s not a questions of being able to reverse. It’s a question of being able to diagnose that one of these changes even was the problem and if so which one.
replies(3): >>42165004 #>>42166373 #>>42168709 #
4. sgarland ◴[] No.42164533[source]
Yes, it is. IMO, except for learning (which should not be done in prod), you shouldn’t make changes that you don’t understand.

The tools seems to mostly tweak various networking settings. You could set up a test instance with monitoring, throw load at it, and change the parameters the tool modifies (one at a time!) to see how it reacts.

replies(2): >>42164601 #>>42170649 #
5. ◴[] No.42164535[source]
6. nine_k ◴[] No.42164601[source]
I'd run such a tool on prod in "advice mode". It should suggest the tweaks, explaining the reasoning behind them, and listing the actions necessary to implement them.

Then humans would decide if they want to implement that as is, partly, modified, or not at all.

replies(2): >>42164659 #>>42166301 #
7. sgarland ◴[] No.42164659{3}[source]
Fair point, though I didn’t see any such option with this tool.
replies(1): >>42164688 #
8. nine_k ◴[] No.42164688{4}[source]
It's developed in the open; we can create Github issue.

Actually https://github.com/oracle/bpftune/issues/99

replies(1): >>42167417 #
9. trelliscoded ◴[] No.42164760[source]
If your staging doesn’t do capacity checks in excess of what production sees, yes.
10. Twirrim ◴[] No.42164990[source]
Disclaimer: I work for Oracle, who publish this tool, though I have nothing to do with the org or engineers that created it

I've been running this for a while on my laptop. So far yet to see any particular weirdness, but also I don't know that I can state with any confidence it has a positive impact either. I've not carried out any benchmarks in either direction.

It logs all changes that it's going to make including what they were on before. Here's an example from my logs:

    bpftune[1852994]: Scenario 'need to increase TCP buffer size(s)' occurred for tunable 'net.ipv4.tcp_rmem' in global ns. Need to increase buffer size(s) to maximize throughput
    bpftune[1852994]: Due to need to increase max buffer size to maximize throughput change net.ipv4.tcp_rmem(min default max) from (4096 131072 7864320) -> (4096 131072 9830400)
11. nehal3m ◴[] No.42165004{3}[source]
If they can be reversed individually you can simply deduce by rolling back changes one by one, no?
replies(2): >>42165128 #>>42165540 #
12. jstanley ◴[] No.42165128{4}[source]
Only if you already suspect that this tool caused the problem.
13. spenczar5 ◴[] No.42165540{4}[source]
Suppose you run a fleet of a thousand machines. They all autotune. They are, lets say, serving cached video, or something.

You notice that your aggregate error rate been drifting upwards since using bpftune. It turns out, in reality, there is some complex interaction between the tuning and your routers, or your TOR switches, or whatever - there is feedback that causes oscillations in a tuned value, swinging between too high and too low.

Can you see how this is not a matter of simple deduction and rollbacks?

This scenario is plausible. Autotuning generally has issues with feedback, since the overall system lacks control theoretic structure. And the premise here is that you use this to tune a large number of machines where individual admin is infeasible.

replies(5): >>42166437 #>>42166446 #>>42166449 #>>42167131 #>>42167792 #
14. bink ◴[] No.42166301{3}[source]
I agree. There's very little need to have a tool automatically changing complex kernel settings on the fly unless your infrastructure is undergoing dramatic changes in load and behavior on a daily basis, which seems unlikely for a modern server.
15. pbhjpbhj ◴[] No.42166373{3}[source]
I focused primarily on guesswho's "in ways I am unaware of".

Your issue appears to be true for any system change. Although, risk will of course vary.

16. pbhjpbhj ◴[] No.42166437{5}[source]
>not only can we observe the system and tune appropriately, we can also observe the effect of that tuning and re-tune if necessary. //

Does sound like a potential way to implement literal chaos.

Surely it's like anything else, you do pre-release testing and balance the benefits for you against the risks?

17. Modified3019 ◴[] No.42166446{5}[source]
Sounds like you have your answer of “don’t use it” then.
18. pstuart ◴[] No.42166449{5}[source]
In that scenario you could run it on a couple servers, compare and contrast, and then apply globally via whatever management tool you use.
19. KennyBlanken ◴[] No.42167131{5}[source]
Presumably one would use autotune to find optimized parameters, and then roll those out via change control, either one parameter at a time, or a mix of parameters across the systems.

Alternatively: if you have a fleet of thousands of machines you can very easily do a binary search with them to a)establish the problem with the auto-tuner and then b)which of the changes it settled on are causing your problems.

I get the impression you've never actually managed a "fleet" of systems, because these techniques would have immediately occurred to you.

replies(1): >>42167272 #
20. spenczar5 ◴[] No.42167272{6}[source]
Certainly when we managed Twitch’s ~10,000 boxes of video servers, neither of the tasks you describe would have been simple. We underinvested in tools, for sure. Even so, I don’t think you can really argue that dynamically changing configs like this are going to make life easier!
21. westurner ◴[] No.42167417{5}[source]
In the existing issue, we can link to the code and docs that would need to be understood and changed:

usage, main() https://github.com/oracle/bpftune/blob/6a50f5ff619caeea6f04d...

- [ ] CLI opts: --pretend-allow <tuner> or --log-only-allow <tuner> or [...]

Probably relevant function headers in libbpftune.c:

bpftune_sysctl_write(

bpftuner_tunable_sysctl_write(

bpftune_module_load(

static void bpftuner_scenario_log(struct bpftuner *tuner, unsigned int tunable, ; https://github.com/oracle/bpftune/blob/6a50f5ff619caeea6f04d... https://github.com/oracle/bpftune/blob/6a50f5ff619caeea6f04d...

replies(1): >>42174416 #
22. toast0 ◴[] No.42167792{5}[source]
When you have a thousand machines, you can usually get feedback pretty quick, in my experience.

Run the tune on one machine. Looks good? Put it on ten. Looks good? Put it on one hundred. Looks good? Put it on everyone.

Find an issue a week later, and want to dig into it? Run 100 machines back on the old tune, and 100 machines with half the difference. See what happens.

23. gerdesj ◴[] No.42168400[source]
"because I'll have drifted from a standard distro configuration"

You will obviously have a change management system which describes all the changes you have made to your putative standard distro configs. You will also be monitoring those changes.

This tool logs all the changes it makes via the standard logging system, which can be easily captured, shipped and aggregated and then queried and reported on.

This is not a tool from Clown Cars R US, it's from a reasonably reputable source - Oracle (lol etc). Even better, you can read the code and learn or critique.

Not being funny but I'd rather this sort of thing by far than any amount of wooo handwavy wankery. Would you prefer openly described and documented or "take our word for it"?

replies(2): >>42168447 #>>42171423 #
24. cortesoft ◴[] No.42168447[source]
> You will obviously have a change management system which describes all the changes you have made to your putative standard distro configs. You will also be monitoring those changes.

Which is now a list you will have to check for every issue. I don't think they are complaining they don't trust the writers of the code, just that it adds confounding variables to your system

replies(2): >>42168508 #>>42168577 #
25. gerdesj ◴[] No.42168508{3}[source]
We (in IT security) are expected to abrogate responsibility to funky AI or whatevs anti virus and other stuff. Buy and install a security package from ... whoever ... and all will be well.

This is an expert system/advice run by real people (at a reasonably well respected firm) not an AI wankery thingie. It is literally expert advice and it is being given away and in code form which you can read.

What on earth is wrong with that?

replies(3): >>42168546 #>>42170490 #>>42171201 #
26. cortesoft ◴[] No.42168546{4}[source]
If the alternative is those proprietary anti virus products, sure this is better.

The original comment was comparing to doing nothing and just using the standard distro, I believe.

replies(1): >>42168654 #
27. fragmede ◴[] No.42168577{3}[source]
> for every issue.

Only if you don't know what you're doing, which, with no judgement whatsoever, might be true for OP. Reading the source, it affects some networking related flags. If the local audio craps out, it's not related. If the Bluetooth keyboard craps out, it's not related. If the hard drive crashes, it's not related.

I get that is just adding more variables to the system, but this isn't Windows, where the changes under the hood are this mystery hotfix that got applied and we have no idea what it did and the vendor notes raise more questions than it asks and your computer working feels like this house of cards that's gonna fall over if you look at it funny. If the system is acting funny, just disable this, reset them all back to default, possibly by rebooting, and see if the problem persists. If you're technical enough to install this, I don't think disabling it and rebooting is beyond your abilities.

28. gerdesj ◴[] No.42168654{5}[source]
I do hope I haven't offended anyone but I also hope I will leave no one in any doubt that IT security is important.

The world is now very highly interconnected. When I was a child, I would have rubbish conversations over the blower to an aunt in Australia - that latency was well over one second - satellite links. Nowadays we have direct fibre connections.

So, does you does ?

29. yourapostasy ◴[] No.42168709{3}[source]
Record changes in git and then git bisect issues, maybe?

Without change capture, solid regression testing, or observability, it seems difficult to manage these changes. I’d like to how others are managing these kinds of changes to readily troubleshoot them, without lots of regression testing or observability, if anyone has successes to share.

30. tw04 ◴[] No.42170490{4}[source]
Well two points: Oracle isn’t really and hasn’t really been respected in several decades.

Oracle exists for one sole purpose, which is to make Larry money. Anything they “give away for free” almost always includes a non-obvious catch which you only discover during some future audit.

In this case it appears to be gpl and thus most likely harmless. But I’d expect either the license to change once people are hooked, or some glaring lack of functionality that’s not immediately obvious, that can only be remediated by purchasing a license of some sort.

replies(1): >>42171582 #
31. zorked ◴[] No.42170649[source]
Learning and self-tuning happens everywhere. Cache sizes that adjust to load, pools that grow and shrink, etc. This is just adding autotuning to something that doesn't have it. With presumably better algorithms than the rules-of-thumb approach that is more common.

It's a great idea.

32. lupusreal ◴[] No.42171201{4}[source]
Being able to dodge responsibility for something going wrong is great, but it's always better for you if you aren't in a position where you have to dodge responsibility in the first place.

So if this tool makes a well reasoned and ostensibly sensible tweak which happens to expose some flaw in your system and takes it down, being able to say "those experts Oracle made the mistake, not me" might get you out of the hot seat. But it's better to never be in the hot seat.

33. xorcist ◴[] No.42171423[source]
> change management system

That's an unusual way to spell "git". But that's not the point. The point is that change management is useless unless you know why you are doing it. That's why all commit messages should contain the "why".

> You will also be monitoring those changes

What you should do is monitor and evaluate the findings, then on taking the decision this is actually what you want, commit it and stage it through the testing environments.

Automatically tuning parameters means diagnosing problems will be even harder than today. There is also the risk of diverging test and prod unless you are being careful. You really have to know what you are doing when deploying these tools.

The worst catastrophes I've seen involves automatically scaling ram/disk/pods. A problem that should have been trivial in the first place can quickly set off feedback loops.

replies(1): >>42171746 #
34. efitz ◴[] No.42171582{5}[source]
Anything that Oracle gives away for free today should be assumed will be converted to be monetized as soon as there is sufficient uptake in usage.

Anything that Oracle makes available for community contributions should be assumed will be dramatically restricted via license when Oracle figures out how to monetize it.

replies(1): >>42178647 #
35. notpushkin ◴[] No.42171746{3}[source]
This could be a nice starting point for such a system though. Is there a logging-only mode?
36. westurner ◴[] No.42174416{6}[source]
Here's that, though this is dnvted to -1? https://github.com/oracle/bpftune/issues/99#issuecomment-248...

Ideally this tool could passively monitor and recommend instead of changing settings in production which could lead to loss of availability by feedback failure; -R / --rollback actively changes settings, which could be queued or logged as idk json or json-ld messages.

37. ranger_danger ◴[] No.42178647{6}[source]
FOSS can always be forked and progressed from there; see MariaDB.

I think most times when a project from a big company goes closed, the features added afterwards usually only benefit other big companies anyways.

Right now I prefer to be happy they ever bothered at all (to make open source things), rather than prematurely discount it entirely.

Maybe you weren't implying that it should be discounted entirely, but I bet a lot of people were thinking that.