Strange difference in performance (30x) between PPC and Intel

Discussion in 'Ruby' started by Julian Tarkhanov, Sep 29, 2007.

  1. Hello Rubytalkers

    I have a very odd problem here and thought that I should ask your
    opinion. I got a test suite here

    http://julik.textdriven.com/svn/tools/micro-apps/pasaporte/trunk/test/

    it's for a little Camping app for OpenID. This is not PR, I mind you.
    However, I have some issues running it on two of our machines. When I
    run it
    on my staging server:

    processor : 0
    vendor_id : GenuineIntel
    cpu family : 15
    model : 2
    model name : Intel(R) Xeon(TM) CPU 2.40GHz

    The test suite takes 3 seconds to run. Fine is that.

    Then I run it on my home G4 (about 700 Mhz).
    It takes 19-26 seconds (20ish). Ok.

    Then I make a checkout on my dev machine at work (a quad G5, 5G RAM )
    and run the suite here.

    It takes a friggin' minute.

    The test suite does nothing fancy except some crypto. When I do ruby-
    prof both, I see the following at the top of the graph on the G5:

    Thread ID: 3348220
    Total: 12.55

    %self total self wait child calls name
    22.07 2.77 2.77 0.00 0.00 155 IO#read <<<<
    this is suspicious!
    4.30 0.54 0.54 0.00 0.00 45
    OpenSSL::BN#mod_exp
    3.51 0.44 0.44 0.00 0.00 1495 <Class::Dir>#[]

    On the Ubuntu box the same shows:

    Thread ID: 3084113660
    Total: 4.92

    %self total self wait child calls name
    8.54 0.42 0.42 0.00 0.00 45
    OpenSSL::BN#mod_exp
    3.86 0.19 0.19 0.00 0.00 155 IO#read

    I immediately suspect that something is blocking somewhere. Almost
    anytime I try to see what's going on by hard-stopping a test with ctrl
    +c I see a reference to
    the ruby-yadis library trying to do an HTTP call.

    Now comes the question. How should I proceed to eliminate this
    problem? Mock the hell out of the HTTP calling part of ruby-yadis?

    I mean, a quad 64bit machine like that cannot be so slow at running a
    test suite like that and the only processor-dependent
    thing I am using here is OpenSSL (the G5 and the dual xeon come
    pretty close with the openssl-speed test). Did anybody have a problem
    with Net::HTTP waiting too long
    and/or blocking before it fails to make an HTTP connection on OS X?

    --
    Julian 'Julik' Tarkhanov
    please send all personal mail to
    me at julik.nl
     
    Julian Tarkhanov, Sep 29, 2007
    #1
    1. Advertising

  2. Re (30x) difference between PPC and Intel - ruby-yadis found guilty

    On 29-sep-2007, at 5:40, Julian Tarkhanov wrote:

    > I have a very odd problem here and thought that I should ask your
    > opinion. I got a test suite here


    Ok, figured it out. It was ruby-yadis who, for some reason, was
    getting late timeouts from Net::HTTP (most likely name lookup takes
    too long in our internal network).
    Fixed it with a kludgy workaround (Ruby-Yadis folks get a huge -3 for
    the fact that their HTTP retrieval is hardcoded).
    --
    Julian 'Julik' Tarkhanov
    please send all personal mail to
    me at julik.nl
     
    Julian Tarkhanov, Sep 29, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,246
  2. Ian A. York

    mxtextools, py2app, and intel vs. PPC

    Ian A. York, Jun 5, 2007, in forum: Python
    Replies:
    0
    Views:
    243
    Ian A. York
    Jun 5, 2007
  3. Praba
    Replies:
    2
    Views:
    349
    Ian Collins
    May 8, 2009
  4. whatnext
    Replies:
    9
    Views:
    421
  5. Kazik�
    Replies:
    4
    Views:
    1,339
    Jonathan Lee
    Jul 6, 2009
Loading...

Share This Page