How to overload memory?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to overload memory?
# 8  
Old 08-10-2006
1st of all, do a df -k /tmp to see how big is your swap space.



2) Go get some big ascii file. E.g. /var/adm/messages
E.g.
cd /var/adm
cat mess* > my_msg
cat my_msg my_msg my_msg my_msg > my_msg.1

You can write a quick while loop to do the above until my_msg.1 becomes slightly smaller than the swap space.

3) mv my_msg.1 /tmp

The reason is to deny the OS from using swap space when your memory runs out.

4) Write a simple perl code that slurps the /tmp/my_msg.1.
E.g
while read <MY_FILE>

You will definitely runs out of memory.
If this is not desired, play around with the size of my_msg.1 until it is the size of the intended memory consumption.

you can use this command to see how much physical memory you have:
prtconf | grep -i mem
# 9  
Old 08-10-2006
Quote:
Originally Posted by jim mcnamara
Or mmap a few giant files....
This will fill up virtual memory, but I don't see how it will place the server under extreme load.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

[DOUBT] Memory high in idle process on Solaris 10 (Memory Utilization > 90%)

Hi Experts, Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing. Why memory utilization on solaris always looks high? I have statement about memory on solaris, is this true: Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies

2. UNIX for Advanced & Expert Users

overload

Hi Friends, we are using RHEL4.2 (Redhat Enterprise Linux ) .My problems is when more more than 51st logs in it is not allowing.It allows only 50 users to log in i.e one user logs-in in 4 to 6 different virtual windows using f1 to f6 , if I kill the older one sometime the file which the... (1 Reply)
Discussion started by: vakharia Mahesh
1 Replies

3. Programming

How to deal with lots of data in memory in order not to run out of memory

Hi, I'm trying to learn how to manage memory when I have to deal with lots of data. Basically I'm indexing a huge file (5GB, but it can be bigger), by creating tables that holds offset <-> startOfSomeData information. Currently I'm mapping the whole file at once (yep!) but of course the... (1 Reply)
Discussion started by: emitrax
1 Replies

4. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

5. Linux

dnssubmit queue overload error message

my squid running on openBSD 4.1 i have dns_childern 32 but i m facing a problem of queue overloading cache.log shows this error message... dnsSubmit: queue overload, rejecting xxxxxxxxxx dnsSubmit: queue overload, rejecting xxxxxxxxxx dnsSubmit: queue overload, rejecting xxxxxxxxxx... (0 Replies)
Discussion started by: anil.pilani
0 Replies
Login or Register to Ask a Question