# Running ruby on 64-bit Windows causing performance Problems

**URL:** <https://www.ruby-forum.com/t/running-ruby-on-64-bit-windows-causing-performance-problems/178280>\
**Category:** Ruby\
**Created:** [November 2, 2009, 4:15am UTC](https://www.ruby-forum.com/t/running-ruby-on-64-bit-windows-causing-performance-problems/178280 "2009-11-02T04:15:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbhandar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/76d3ee/32.png) [@pbhandar](https://www.ruby-forum.com/u/pbhandar)\
**Post date:** [November 2, 2009, 4:15am UTC](https://www.ruby-forum.com/t/running-ruby-on-64-bit-windows-causing-performance-problems/178280/1 "2009-11-02T04:15:18Z")

</div>

Hi,

I am trying to rollout a ruby agent in 32 bit and 64-bit Windows  
Server(s). What I am finding out is that the 32 bit system the agent  
works perfectly. In the 64-bit systems, the product works fine but the  
agent seems to take 24 % of the CPU of the server. Where as in a system  
similar but with 32-bit windows, the CPU usage maxes out at 1.5%.

Is there a way to compile Ruby for 64-bit Windows? Has anyone seen this  
issue? Are there some tricks to solve this issue quickly?

Thank you for anyone’s input in advance.

Prakash

---

<div class="post-metadata">

**Author:** ![pbhandar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/76d3ee/32.png) [@pbhandar](https://www.ruby-forum.com/u/pbhandar)\
**Post date:** [November 2, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/running-ruby-on-64-bit-windows-causing-performance-problems/178280/2 "2009-11-02T12:27:38Z")

</div>

On Nov 2, 12:15 am, Pra B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I am trying to rollout a ruby agent in 32 bit and 64-bit Windows  
> Server(s). What I am finding out is that the 32 bit system the agent  
> works perfectly. In the 64-bit systems, the product works fine but the  
> agent seems to take 24 % of the CPU of the server. Where as in a system  
> similar but with 32-bit windows, the CPU usage maxes out at 1.5%.

What version of ruby are you using for your agent?

How your script has been structured? It sit idle or performs any  
routine or loops with sleep?

> Is there a way to compile Ruby for 64-bit Windows?

Don’t think that is the issue. Anyhow at this time only Visual Studio  
64 bits can do it.

You would also need to compile every library and extension used by  
ruby to run in 64 bits.

> Has anyone seen this  
> issue?

No, using RubyInstaller daily in Windows 7 64 bits without these  
issues.

---

<div class="post-metadata">

**Author:** ![pbhandar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/76d3ee/32.png) [@pbhandar](https://www.ruby-forum.com/u/pbhandar)\
**Post date:** [November 3, 2009, 12:58am UTC](https://www.ruby-forum.com/t/running-ruby-on-64-bit-windows-causing-performance-problems/178280/3 "2009-11-03T00:58:12Z")

</div>

Luis L. wrote:

> On Nov 2, 12:15ï¿½am, Pra B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi,
> > 
> > I am trying to rollout a ruby agent in 32 bit and 64-bit Windows  
> > Server(s). What I am finding out is that the 32 bit system the agent  
> > works perfectly. ï¿½In the 64-bit systems, the product works fine but the  
> > agent seems to take 24 % of the CPU of the server. ï¿½Where as in a system  
> > similar but with 32-bit windows, the CPU usage maxes out at 1.5%.
> 
> What version of ruby are you using for your agent?

I am using Ruby 1.8.6 (2007-09-24 patch level 111).

> How your script has been structured? It sit idle or performs any  
> routine or loops with sleep?

Its running as a Windows service. It sleeps and wakes up every so many  
seconds and checks if there is anything for it to do.

> > Is there a way to compile Ruby for 64-bit Windows?
> 
> Don’t think that is the issue. Anyhow at this time only Visual Studio  
> 64 bits can do it.  
> What do you think is the issue? Looking at identical configurations -  
> one on 64-bit vs 32-bit I was convinced that somehow this issue is  
> related to WOW64.dll or the mismatch in the bits.

> You would also need to compile every library and extension used by  
> ruby to run in 64 bits.
> 
> > Has anyone seen this  
> > issue?
> 
> No, using RubyInstaller daily in Windows 7 64 bits without these  
> issues.

Installer works just fine. There are no errors, just the very  
predictable spikes on the 64-bit servers only.

Any pointers even if they have not been validated would be very much  
welcome.

Thanks.

Prakash
