TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Where are the self-tuning systems?

80 pointsby fcambusalmost 10 years ago

15 comments

huevingalmost 10 years ago
Unless an application is pretty poorly written, anything that is safe to self-tune isn&#x27;t a configuration option in the first place. The crux of the issue is that the system&#x2F;application doesn&#x27;t have enough perspective to understand if it should self-tune one direction or the other.<p>For example, if an app runs out of file descriptors, is that happening because of normal conditions or is something wrong? Increasing the max blindly until the issue goes away is rarely the right answer.<p>Each self-tuning app would have to have logic more complex than the business logic itself to understand how it will interact in the environment it&#x27;s running in (other apps, hardware, expected traffic bursts, etc).<p>This entire article is pretty shallow on the things it attacks. Take the following: &quot;Why does the JVM still need messing around GC settings to get acceptable performance&#x2F;memory usage?&quot;<p>The answer to this should be obvious to anyone that has developed high-performance Java apps. There is no possible way for the garbage collector to understand what your application is doing to guess the optimal times to interrupt and collect. Unless your app is a tiny state machine, the garbage collector trying to self-tune based on runtime behavior is going to make your performance worthlessly unpredictable.
评论 #9633700 未加载
tlarkworthyalmost 10 years ago
A robotic analogue is tuning PID loops. There exists loads of literature on the subject, but it turns out that it&#x27;s quite hard, despite the relatively simplicity of the control law [1]. It&#x27;s the underlying dynamics that results in no golden rule of PID tuning if you start the system from a random state.<p>The whole computer stack is similarly complex, but higher dimension and it&#x27;s not clear what metric you would tune against (it would be application specific). Not that I think it&#x27;s impossible, lots of regions of computer science are self-adaptive (TCP, splay tree). Its just the ensemble is a mega chaotic space. Maybe someone will hook up a DBN and skynet it soon.<p>[1] <a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;PID_controller#Loop_tuning" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;PID_controller#Loop_tuning</a>
评论 #9634411 未加载
评论 #9635176 未加载
评论 #9635015 未加载
pronalmost 10 years ago
There are a few reasons why this is hard:<p>* Lack of information -- in order to pick the right parameters, the system needs to know what you&#x27;re trying to achieve (e.g., do you want to minimize latency or maximize throughput?). Communicating that more effectively than just specifying parameters is challenging.<p>* Instead of telling the system what you want, it can try to figure it out -- to <i>some</i> extent -- by observing program behavior and dynamically fiddling with value. The problem with this approach is that it creates feedback loops that muddle things beyond repair.<p>* Optimization over a high dimensional space is hard. As an example (even with just one dimension), see this bit from Doug Lea&#x27;s talk about why dynamic tuning of spinning vs. blocking on concurrency constructs doesn&#x27;t work: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;sq0MX3fHkro?t=39m48s" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;sq0MX3fHkro?t=39m48s</a><p>* Writing systems that never reboot[1] <i>and</i> are efficient is very hard. Dynamic variables usually require inserting checks at runtime that can&#x27;t be optimized away by an AOT compiler. This is where a speculatively-optimizing JIT comes in handy, but JITs aren&#x27;t appropriate for all uses, and even where they are, good optimizing JITs are notoriously hard to write.<p>--<p>&gt; Why does the JVM still need messing around GC settings to get acceptable performance&#x2F;memory usage?<p>OpenJDK&#x27;s HotSpot does fairly reasonable auto-tuning now (known as &quot;GC ergonomics&quot;). You can pick either the throughput collector and <i>maybe</i> set your young-gen ratio, or G1 and set a maximum-pause goal. Along with the maximum heap size, those are just three values, one of which is binary, another is often unnecessary and the third can be a very rough estimation. This should be more than enough for the vast majority of systems, certainly with Java 8. Much of the GC tuning parameters you see in the wild are old remnants from before GC ergonomics, that people are afraid to pull out.<p>[1]: <a href="http:&#x2F;&#x2F;steve-yegge.blogspot.co.il&#x2F;2007&#x2F;01&#x2F;pinocchio-problem.html" rel="nofollow">http:&#x2F;&#x2F;steve-yegge.blogspot.co.il&#x2F;2007&#x2F;01&#x2F;pinocchio-problem....</a>
评论 #9633804 未加载
评论 #9633683 未加载
评论 #9634039 未加载
leocalmost 10 years ago
Wasn&#x27;t there a Linux kernel contributor with a medical background who used to push unsuccessfully for it to have more self-tuning&#x2F;homeostatic behaviour? (It wasn&#x27;t Greg Kroah-Hartmann was it?)
评论 #9633857 未加载
Animatsalmost 10 years ago
There are lots of self-tuning systems in industrial control now. Some of the theory overlaps with machine learning. The theory is really hard, so hard that control theory PhDs are struggling deciding what math to learn.<p>I get IEEE Control Systems Technology magazine, but I don&#x27;t understand most of it any more.
lordnachoalmost 10 years ago
You&#x27;d need some way to express preferences, eg utility functions.<p>If it&#x27;s obvious (&quot;avoiding people on the road better than getting there in time&quot;) it will be in the system.<p>If it&#x27;s not obvious (&quot;want throughput and latency&quot;) you&#x27;re back at square one.
sanxiynalmost 10 years ago
I had a good experience with <a href="http:&#x2F;&#x2F;opentuner.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;opentuner.org&#x2F;</a>. Try it.
cecalmost 10 years ago
I think the author does a great job at venting frustration at the state of autotuning systems research, though I would disagree that the research interest has dried up. On the contrary, autotuning research is alive and kicking, the problem is that there has been few attempts to unify all the competing systems that exist (with some exceptions [1]). As such, the state of autotuning is fragmented, with no one approach able to achieve the critical mass needed to hit the mainstream.<p>Disclaimer: I&#x27;m doing a PhD in autotuning ;-)<p>[1] <a href="http:&#x2F;&#x2F;ctuning.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ctuning.org&#x2F;</a>
simulaterealityalmost 10 years ago
&quot;self-tuning&quot; is alive in activity metering<p><a href="http:&#x2F;&#x2F;www.autoletics.com&#x2F;posts&#x2F;managing-performance-analysis-complexity-adaptive-hotspot-measurement" rel="nofollow">http:&#x2F;&#x2F;www.autoletics.com&#x2F;posts&#x2F;managing-performance-analysi...</a><p>and execution control of systems using adaptive control valves &amp; QoS<p><a href="https:&#x2F;&#x2F;vimeo.com&#x2F;groups&#x2F;sentris" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;groups&#x2F;sentris</a><p><a href="http:&#x2F;&#x2F;www.autoletics.com&#x2F;wp-content&#x2F;uploads&#x2F;2014&#x2F;07&#x2F;UsingSystemDynamicsforEffectiveConcurrencyConsumptionControlofCode.pdf" rel="nofollow">http:&#x2F;&#x2F;www.autoletics.com&#x2F;wp-content&#x2F;uploads&#x2F;2014&#x2F;07&#x2F;UsingSy...</a><p><a href="http:&#x2F;&#x2F;www.autoletics.com&#x2F;wp-content&#x2F;uploads&#x2F;2014&#x2F;07&#x2F;AdaptivelyControllingApacheCassandraClientRequestProcessing.pdf" rel="nofollow">http:&#x2F;&#x2F;www.autoletics.com&#x2F;wp-content&#x2F;uploads&#x2F;2014&#x2F;07&#x2F;Adaptiv...</a><p>self-adaptation (self-tuning being a sub category) needs to be both online &amp; offline in reality<p><a href="http:&#x2F;&#x2F;www.autoletics.com&#x2F;posts&#x2F;iterative-application-performance-benchmark-analysis" rel="nofollow">http:&#x2F;&#x2F;www.autoletics.com&#x2F;posts&#x2F;iterative-application-perfor...</a>
bedealmost 10 years ago
Self-tuning systems are inherently complex and opaque. Execution tends to be non-deterministic and irreproducible, and so the burden of testing is far greater.<p>It takes some discipline to write elegant, loosely coupled code that is self-tuning. I work on scientific software, where reproducibility and reusability is (…or at least <i>should be</i>) paramount, and where black boxes are evil. It&#x27;s hard not to build black boxes when you&#x27;re writing self-tuning software.
ExpiredLinkalmost 10 years ago
&gt; <i>Why does the JVM still need messing around GC settings to get acceptable performance&#x2F;memory usage?</i><p>But the JIT <i>is a</i> self-tuning system! Here you are.
评论 #9633663 未加载
评论 #9633629 未加载
TheLoneWolflingalmost 10 years ago
A tangentially related optimization:<p>When you read a value from a collection, move it towards the front.<p>Requires that order not be important, of course. Ditto, it&#x27;s more trouble than it&#x27;s generally worth if you&#x27;re doing any sort of multithreading, or if you&#x27;re using something where writes are much slower than reads.<p>It&#x27;s also handy for most hash tables. (Though generally you should be using a Cuckoo hashtable anyways)
ximengalmost 10 years ago
<a href="http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.107.8842" rel="nofollow">http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.107....</a><p>Self-tuning databases from MS Research
thrownaway2424almost 10 years ago
There are optimizes for jvm flags. One of them is called Groningen and it will optimize your GC parameters for throughout or pause duration of other custom goals that you provide. I believe it is a genetic algorithm.
jwattealmost 10 years ago
Put two self tuning apps on the same machine, and watch them feedback into self-oscillation!