Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Strange difference in performance (30x) between PPC and Intel

Reply
Thread Tools

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

 
 
Julian Tarkhanov
Guest
Posts: n/a
 
      09-29-2007
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/tool...te/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:ir>#[]

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



 
Reply With Quote
 
 
 
 
Julian Tarkhanov
Guest
Posts: n/a
 
      09-29-2007

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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mxtextools, py2app, and intel vs. PPC Ian A. York Python 0 06-05-2007 11:18 AM
File shareing between PPC and Desktop Jon C Wireless Networking 3 09-06-2005 11:09 AM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Difference between intel P4M and pentium M laptops Chris Computer Information 5 03-07-2005 12:22 PM
Performance problems on Intel but not AMD... strange Chris Roe Java 1 06-11-2004 08:11 AM



Advertisments