Forum: Ruby StressTest

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2a6d6d65de567227909564c568629ab9?d=identicon&s=25 Ilias Bankai (bankai)
on 2008-12-25 19:50
Hello All,

Is there a way to allocate memory with a ruby script?

I want to create a script that allocate a certain amount of memory and
use it to stress test our Citrix servers.


I have 40 test accounts. All these account can login concurrent to a
Citrix server. During the login I want to fire up the Ruby script for
each user that allocates 350 MB per session.

Any help /guidance is much appreciated.

Platform:
Windows 2003 SP2 (64-bit)
ruby -v (ruby 1.8.6 (2007-09-24 patch level 111) [i386-mswin32])


Kind Regards,


iLias
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2008-12-25 20:00
(Received via mailing list)
On 25.12.2008 19:50, Ilias bankai wrote:
> Is there a way to allocate memory with a ruby script?
>
> I want to create a script that allocate a certain amount of memory and
> use it to stress test our Citrix servers.
>
>
> I have 40 test accounts. All these account can login concurrent to a
> Citrix server. During the login I want to fire up the Ruby script for
> each user that allocates 350 MB per session.

ruby -e '"x" * 350_000_000'

Cheers

  robert
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2008-12-25 21:48
(Received via mailing list)
On Thu, Dec 25, 2008 at 8:00 PM, Robert Klemme
<shortcutter@googlemail.com> wrote:
>> each user that allocates 350 MB per session.
>
> ruby -e '"x" * 350_000_000'
It is true that OP did not state it, but somehow I guess that he does
not want the memory to be released.
In that case add a gets to Robert's one liner
"x" * 350_000_000 ; gets
HTH
Robert
>
> Cheers
>
>        robert
>
> --
> remember.guy do |as, often| as.you_can - without end
>
>



--
Il computer non è una macchina intelligente che aiuta le persone
stupide, anzi, è una macchina stupida che funziona solo nelle mani
delle persone intelligenti.
Computers are not smart to help stupid people, rather they are stupid
and will work only if taken care of by smart people.

Umberto Eco
2a6d6d65de567227909564c568629ab9?d=identicon&s=25 Ilias Bankai (bankai)
on 2008-12-26 00:51
Robert Dober wrote:
> On Thu, Dec 25, 2008 at 8:00 PM, Robert Klemme
> <shortcutter@googlemail.com> wrote:
>>> each user that allocates 350 MB per session.
>>
>> ruby -e '"x" * 350_000_000'
> It is true that OP did not state it, but somehow I guess that he does
> not want the memory to be released.
> In that case add a gets to Robert's one liner
> "x" * 350_000_000 ; gets
> HTH
> Robert
>>
>> Cheers
>>
>>        robert
>>
>> --
>> remember.guy do |as, often| as.you_can - without end
>>
>>
>
>
>
> --
> Il computer non � una macchina intelligente che aiuta le persone
> stupide, anzi, � una macchina stupida che funziona solo nelle mani
> delle persone intelligenti.
> Computers are not smart to help stupid people, rather they are stupid
> and will work only if taken care of by smart people.
>
> Umberto Eco

Exactly, I don't want the memory to be released (for a while)

("x" * 350_000_000 ; gets) works perfect!!

Thank you very much guy's !!

Regards,

iLias
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2008-12-26 11:00
(Received via mailing list)
On 26.12.2008 00:51, Ilias bankai wrote:

> Exactly, I don't want the memory to be released (for a while)

You could as well use sleep then.

Cheers

  robert
2a6d6d65de567227909564c568629ab9?d=identicon&s=25 Ilias Bankai (bankai)
on 2008-12-26 13:41
I will indeed, thanks again for your support!


Regards,

iLias.
This topic is locked and can not be replied to.