in reply to Re: Re: Faster Perl, Good and Bad News
in thread Faster Perl, Good and Bad News

Now I'm having to tune this for two machines, one with 128 megs of ram and 700 mhz pIII processor, and a pII 300 mhz with 212 megs of ram.

Something else to consider when optimizing: What is the cost , compared with the cost of implementing various solutions. Multiply the time it takes you to develop an XS-based solution times the cost of your time, and compare this to the cost of adding memory to these machines. You can add a 128Mb stick to a box for < 75 USD right now.(Granted, once you factor in overhead in including purchasing and labor, it costs an organization more this.)

It may well be that capital budget is difficult where you work, and that throwing your time at the problem is less expensive. But this is still a calculation that you and your management (or management equivalent) need to make.

Replies are listed 'Best First'.
Re(4): Faster Perl, Good and Bad News
by FoxtrotUniform (Prior) on Aug 10, 2002 at 22:39 UTC
      You can add a 128Mb stick to a box for < 75 USD right now.(Granted, once you factor in overhead in including purchasing and labor, it costs an organization more this.)

    dws++ for bringing up the issue of adding hardware (there are many ways of making code fast enough, one of which is throwing Moore's Law at the problem), but if this code's running on a production machine, the cost of adding hardware may be astronomically higher than $75USD once you factor in the cost of downtime. If you don't have a hot failover box, you'll have to shut down the machine for at least a couple of minutes, and in my experience this sort of trivial upgrade ("we're just adding another stick of RAM, what could go wrong?") is exactly the kind of thing that ends up lasting for hours and generating infinite Angry Customer Calls. If that $75 stick of RAM ends up losing you a $100,000 contract, you might have been better off paying a programmer to spend a day profiling, optimizing, and documenting the code.

    I realize that your response was much more sophisticated than just "hardware's cheap, throw hardware at it", but not all costs are obvious, and it's often a mistake to look only at first-order costs. (This happens with a lot of hardware purchases: buying that cheap KVM switch costs you a lot of money when it dies just before a major outage, for instance.)

    That said, if you're running into hardware walls like this on a regular basis, it's probably time to upgrade somewhere in the near future -- like your next maintenance window.

    (And without bringing in a straw-man argument, let me just mention that there are some places -- hospitals, for instance -- where downtime costs more than just money.)

    --
    F o x t r o t U n i f o r m
    Found a typo in this node? /msg me
    The hell with paco, vote for Erudil!

      A few years ago, my boss at the time came to me one day and said, "Don't make your self indespensible to me, cos if you do, I'll have to sack you!".

      The relevance in this thread?

      Any single machine that is so indispensible that it being down can cost $100,000, should be done away with, forthwith.

      Why? Cos one day--sooner rather than later, and despite air-condition rooms, premium-grade, tested components, regular maintainance and all the TLC in the world--it's gonna fail. And Murphy's law, it's gonna do it just as that $100,000 contract is being finalised.

          Any single machine that is so indispensible that it being down can cost $100,000, should be done away with, forthwith.

        If you can convince the sales staff not to pimp some shiny new feature until us implementation grunts have a solid, well-tested, reliable process in place, you'll never buy yourself another drink as long as we're in the same bar. How many times have you heard "Well, we don't have a backup box, and the software doesn't actually work yet, but we've promised the client this nifty new feature, so I guess you guys're working overtime for a few weeks"?

        No, it shouldn't happen. But it does.

        --
        F o x t r o t U n i f o r m
        Found a typo in this node? /msg me
        The hell with paco, vote for Erudil!