Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Re: /proc/uptime



Nguyen Vu Hung wrote:
> On Fri, Nov 14, 2008 at 11:51 AM, Stephen J. Turnbull
> <stephen@example.com <mailto:stephen@example.com>> wrote:
>
>     Nguyen Vu Hung writes:
>
>      > > No. It indicates the amount of time any one of the cores has
>      > > nothing to do.
>
>      > Is this a good design? I think no. I will replace OR with AND.
>      > Not every recently applications are SMP aware, and some never is.
>
>     So?  That doesn't change the fact that some of the processors are
>     doing almost no useful work!
>

> I did mean  "It indicates the amount of time any one of the cores has
> nothing to do"
> does not make a good sense and it should be
> "It indicates the amount of time *all the* cores has nothing to do".

I think what John meant is that it is the sum of the amount of time any
one of the cores has nothing to do.  i.e. the amount of CPU seconds of
wasted  processor time, not the time wasted by an arbitrarily chosen CPU.

>      And multi-thread programming (like
>     explicit heap management) is a waste of programmer skull-sweat in most
>     *server applications* as far as I can see; there's very little loss to
>     running multiple processes.  For example, it's trivial to configure
>     one web proxy (which will run on one core) to front-end to several
>     webservers.  That will get you core usage up (although if your disk IO
>     channels are already fully-loaded, it won't change the idle time
>     %-age).
>

> I take graphicsmagick as an example.
> http://www.graphicsmagick.org/OpenMP.html
> Before 1.3, it doens't support SMP so the gm command only runs on
> *ONE* core.
> In 1.3, I can see ~x2 speedup on my dual Xeon linux box.

Well Stephen was specifically talking about *server applications* in
which it is somewhat unclear whether a multi-threaded approach is beter
then multiprocess approach.  Image processing is not generally
considered a server application, however varnishd, which is considered
one of, the faster software based http caching proxies is multithreaded,
but the most common architecture for rails applications seems to be
multiprocess.

>     So, if your number says some of your processors are idle 99% of the
>     time, and that bothers you, you're buying too many processors (in some
>     sense, of course there's an integer problem here).  Either spend more
>     money on memory and IO channels (and get more output per box with the
>     same CPUs), or spend less on processors (and spend less per box).
>

>  I dual boot the dual Xeon box. On Windows, I run Adobe PS3, which is
> using Adobe Camera Raw)
> to convert hundreds of Nikon NEF files to JPEG. I really benefit from
> SMP in this case.

Well that is a very different use case from a web server, obviously you
need better IO, perhaps adding SSD or more RAM might help.  I gather you
are serving images?

Edward


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links