[HN Gopher] 5 minutes of coding yields a 6%+ boost to Linux I/O ...
       ___________________________________________________________________
        
       5 minutes of coding yields a 6%+ boost to Linux I/O performance
        
       Author : mfiguiere
       Score  : 68 points
       Date   : 2024-01-16 17:53 UTC (5 hours ago)
        
 (HTM) web link (www.phoronix.com)
 (TXT) w3m dump (www.phoronix.com)
        
       | ijhuygft776 wrote:
       | How many hours, days, weeks of thinking?
        
         | rad_gruchalski wrote:
         | > Axboe shared about his latest interesting Linux I/O
         | performance optimization, "Something I've had in the back of my
         | mind for years, and finally did it today. Which is kind of sad,
         | since it was literally a 5 min job, yielding a more than 6%
         | improvement. Would likely be even larger on a full scale distro
         | style kernel config."
         | 
         | Seems irrelevant. From the sound of it this was something that
         | would always have been easy for him to do. He just never got to
         | do it until now.
        
           | nomel wrote:
           | Even in open source software, the eyes of many will never
           | come close to the brains of one (for better or worse).
        
           | sophacles wrote:
           | Maybe, maybe not. Lots of stuff gets put in "the back of my
           | mind" because I'm not sure how to do it immediately. Maybe
           | I'll think about it occasionally, or note a consequence like
           | "oh this would be affected if I get around to X". Then when I
           | actually sit down to do it weeks or months later it seams
           | easy - even though when I first thought it I wasn't sure how
           | to even do it.
           | 
           | Point being- it's pretty unlikely that something bouncing
           | around the back of someone's head for years would have taken
           | 5 minutes to do right away, just as it's unlikely that it
           | would have taken 6 years if they'd started when they first
           | had the thought. I suspect there's been some amount of
           | thinking, and potentially that other work was subtly
           | influenced by this thought so that finally doing the task was
           | "easy".
        
       | droningparrot wrote:
       | It may have taken 5 minutes to write the code, but it sounds like
       | they spent years thinking about the change to make.
        
         | readyplayernull wrote:
         | That's what I always tell at work.
        
         | cozzyd wrote:
         | It takes less than 5 minutes to write out the Standard Model
         | Lagrangian too :)
        
       | blibble wrote:
       | the amount of codebases I've worked on that spend most of their
       | CPU time measuring the time is not inconsequential
        
       | jl6 wrote:
       | I am reminded of the story of the plumber who was called to fix a
       | water leak. He replaced a washer and charged $100. The client was
       | outraged: "That washer was only a dollar's worth of parts!"
       | 
       | The plumber replied: "Sure. I'm charging you $1 for the washer
       | and $99 for knowing where to fit it."
        
         | andersource wrote:
         | Sounds like a variation of the Ford-GE $10k chalk mark story:
         | 
         | https://www.reddit.com/r/todayilearned/comments/2b4n7a/til_h...
        
           | dublin wrote:
           | This famous "granddaddy of them all" story about knowing
           | where to make a chalk mark was validated in a 1965 letter to
           | the editor of Life magazine. Although most Internet sources
           | act as though this story is apocryphal, it has some real (if
           | not conclusive) provenance, and definitely fits the known
           | personality quirks of both Henry Ford and Charles
           | Steinmetz...
        
           | slowmovintarget wrote:
           | More generic $50K version:
           | https://www.et.byu.edu/~tom/jokes/Consultant_Engineer.html
        
       | GiorgioG wrote:
       | Everyone knows that programming is just typing.
        
         | thebruce87m wrote:
         | Now I've got to copy and paste out of the ChatGPT window too.
         | That's two extra steps.
        
       | zwieback wrote:
       | Title should be "Six years of thinking allow programmer to solve
       | problem in 5 minutes".
       | 
       | I remember contracting for IBM in the 90s and we had a huge
       | performance boost due to caching and, like the anecdote in this
       | post, there was a slight chance of something going out of date.
       | The IBM guys said "no thanks, IBM prefers bullet proof over
       | fast".
        
         | toasted-subs wrote:
         | Then ibm got outpaced by the rest of industry.
         | 
         | Bulletproof typically means rigid in design. Trading one bag of
         | worms for another.
        
           | zwieback wrote:
           | Yep, especially as IT moved downmarket from mainframes run by
           | government, military and large corporations to the average
           | Joe, who can reboot, reinstall or just buy a new one.
        
         | leeoniya wrote:
         | > Title should be "Six years of thinking allow programmer to
         | solve problem in 5 minutes".
         | 
         | "You didn't pay me $1k to press three buttons; you paid me $1k
         | for knowing which three buttons to press."
         | 
         | EDIT: oh, i see a version of this was already posted in another
         | comment :)
        
       | harshaw wrote:
       | this is a pretty standard performance win to avoid constantly
       | getting the time when you don't need it. Certainly seen this win
       | at work (AWS) but also likely in various other projects
       | repeatedly. But bias for action for getting it done!
        
         | loeg wrote:
         | Yeah. We use and cache rdtsc a fair amount to avoid its
         | relatively high overhead in the storage stack I'm working on as
         | well.
        
       ___________________________________________________________________
       (page generated 2024-01-16 23:01 UTC)