LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need an Application that consumes 80% of RAM usage.. (https://www.linuxquestions.org/questions/linux-newbie-8/need-an-application-that-consumes-80-of-ram-usage-4175428732/)

danibhai 09-24-2012 02:37 AM

Need an Application that consumes 80% of RAM usage..
 
Hi ,

I Need any linux application that i need to run on my fedora 16 , that would consume min 80 % of memory usage during its execution, considering i'm running on 2 cpu, 2gb ram on a fedora 16 virtual machine.

Please do suggest..!!

pan64 09-24-2012 02:39 AM

you can write such app in c in an hour. Just use malloc...

danibhai 09-24-2012 02:46 AM

I'm bit weak in scripts n programming, would be great if u can let me know any , be it third party application , say , after installing and running it , it should consume 80% of ram, Thanks..
I just intend to take logs of that application with pid that is causing high mem usage..thats it.

jefro 09-24-2012 03:05 PM

Use ram disk or ramdrive? Does it have to be an application?

TB0ne 09-24-2012 03:15 PM

Quote:

Originally Posted by danibhai (Post 4787775)
I'm bit weak in scripts n programming, would be great if u can let me know any , be it third party application , say , after installing and running it , it should consume 80% of ram, Thanks..
I just intend to take logs of that application with pid that is causing high mem usage..thats it.

Spell out your words....and you've been registered here for three years. Have you not done/tried ANYTHING after three years of using Linux?? Pan64 gave you a good start...did you not bother trying to even look it up, or do anything with it? Just putting "malloc c program to use all ram" into Google pulls up this as the VERY FIRST HIT:
http://stackoverflow.com/questions/1...exhaust-memory

...with source-code, explanations, and tips.

danibhai 09-26-2012 01:42 AM

Thanks every one, TB0ne ->> I'm specifiably looking for an application just like Jmeter, for stress testing, its my fault i did not clear my query in the beginning.C program does not serve my purpose.. True i have been a member for almost 3 years, and i do tweak with Linux commands and unix concepts, thanks to this forum... for all the help..

pan64 09-26-2012 01:46 AM

What is the problem with c? It is probably the simplest way (I just read your first post again). You can use awk, perl or whatever language you know, just tell us what do you prefer and what suits your needs

linuxxer 09-26-2012 07:51 AM

Quote:

Originally Posted by danibhai (Post 4787764)
that would consume min 80 % of memory usage during its execution

Code:

NO=
MEMSIZE=

for num in $(seq 1 $NO)
do
dd if=/dev/zero of=/dev/null bs=$MEMSIZE &
done

I think, this will work.

unSpawn 09-26-2012 08:30 AM

Why re-invent the wheel? There's a simple application that can provide about any kind of load and it's called stress.

TB0ne 09-26-2012 09:12 AM

Quote:

Originally Posted by danibhai (Post 4789466)
Thanks every one, TB0ne ->> I'm specifiably looking for an application just like Jmeter, for stress testing, its my fault i did not clear my query in the beginning.C program does not serve my purpose.. True i have been a member for almost 3 years, and i do tweak with Linux commands and unix concepts, thanks to this forum... for all the help..

The stress application is a good fit. But danibhai, the question of why a program written in a certain language 'does not serve my purpose' doesn't make sense. You asked for a way to use 80% of RAM...you were given a way to use 80% of RAM, the program was already written in the thread provided. Copy/paste it to a file, compile it, run it.

linuxxer 09-27-2012 07:10 AM

Quote:

Originally Posted by unSpawn (Post 4789773)
Why re-invent the wheel? There's a simple application that can provide about any kind of load and it's called stress.

Thanks for this link.
It is really helpful.

danibhai 09-27-2012 07:55 AM

Thank you all for the help.. Appreciate it..


All times are GMT -5. The time now is 10:05 AM.