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.
Ilias B. (Guest)
on 2008-12-25 20: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
Robert K. (Guest)
on 2008-12-25 21: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
Robert D. (Guest)
on 2008-12-25 22:48
(Received via mailing list)
On Thu, Dec 25, 2008 at 8:00 PM, Robert K.
<removed_email_address@domain.invalid> 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
Ilias B. (Guest)
on 2008-12-26 01:51
Robert D. wrote:
> On Thu, Dec 25, 2008 at 8:00 PM, Robert K.
> <removed_email_address@domain.invalid> 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
Robert K. (Guest)
on 2008-12-26 12: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
Ilias B. (Guest)
on 2008-12-26 14:41
I will indeed, thanks again for your support!


Regards,

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