RAM Drive in UNIX?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users RAM Drive in UNIX?
# 1  
Old 09-19-2006
RAM Drive in UNIX?

Hello,

I will be processing 47000 zip files each of size 5.5 MB.

Following operation will be performed for each zip file:

1. Unzip the file.

2. Read each text and binary file.

3. Preprocess the files.

4. Store the files in different tables in Oracle.

5. Delete the extracted files.

All of this operation must be completed in 4 hours.

To speed-up this process, is it possible to keep the extracted files in RAM instead of hard-disk?

It is possible to set aside some amount of RAM and treat that as hard-disk on Windows; to resolve this problem can something on similar lines be done in UNIX also?

Thanks,

Vaibhav
# 2  
Old 09-19-2006
Yes, it's called memory mapped files. You'll have to use Pro*C and call mmap.

try man mmap - you can then operate on all of the file in memory with norma data pointers.

edit>
On second though you could run 'parallel' by writing a script to do your work then dropping off 10 or 12 jobs and waiting sort of like this:
Code:
#!/bin/ksh
let cnt=0
while read file
do
     let cnt=$cnt+1
     myscript.sh  "$file" &
     if [[ $cnt -eq 12 ]]; then
        wait
        let cnt=0
     fi
done < list_of_filenames

Oracle is very good at handling a lot of jobs at one time.
# 3  
Old 09-19-2006
Thanks for the information.

Is it possible to simply create another drive in the RAM?

That is this drive will be treated by UNIX OS as a "physical" drive?

Please let me know.

-- Vaibhav
# 4  
Old 09-19-2006
Yes, this is possible. Which UNIX?

Newer versions of Linux will have a /dev/shm/ directory which already does what you want.
# 5  
Old 09-19-2006
The version is UNIX 11.

I need to complete the processing of every zip file in about 300 ms.

The server has 4 dual Intel processors.
# 6  
Old 09-20-2006
Please don't make us guess. UNIX is not a brand name. Is this HP UNIX? here is how to use a RAM drive in HP UNIX, though they call it "unsupported and dangerous"...

Since it has four processors, you could try running four simultaneous jobs. That way, one job would only need to complete in 1200ms to get the required throughput.

If you have enough buffer cache, RAM disk versus normal disk shouldn't matter a huge amount. All changes get cached in RAM anyway.

Last edited by Corona688; 09-20-2006 at 11:26 AM..
# 7  
Old 09-20-2006
Sorry about that...

It is HP UNIX.

The server is HP RP3440.

It has 8 GB of RAM.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help to move .csv file from UNIX path to windows shared drive or c:\ drive

Hi Guys, Can any one help me on this. I need help to move .csv/.xls file from unix path to windows shared drive or c:\ drive? Regards, LKR (1 Reply)
Discussion started by: lakshmanraok117
1 Replies

2. Filesystems, Disks and Memory

Disk space and RAM status in UNIX

I have an application which is running under AIX, HP UNIX, SCO, and LINUX(redhat and SuSE). and its dealing with some bulk amount of file handling, and some of my boxes are not very good in terms of resources like memory and disk space. so i wanted to know the statistics of each of my boxes. Like... (2 Replies)
Discussion started by: renjithram
2 Replies

3. Red Hat

red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb

Hi, On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies

4. HP-UX

How should I know the total RAM available on UNIX

Hi How Should I know the Total RAM available on HP-UX box? (7 Replies)
Discussion started by: skull123
7 Replies

5. UNIX for Dummies Questions & Answers

RAM Drive

I need to have fast access to some of my files (like 5 Gb). Im on: Linux franklin3 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux How can I load my files in my RAM ? Thank you in advance! (0 Replies)
Discussion started by: Gab
0 Replies

6. UNIX for Dummies Questions & Answers

RAM size in Digital unix

Hi All Im currntly working on a digital unix machine and must know what is the amount of MB\GB instaled ( i do not have physical access to the machine). can anyone help me here? 10x!!!!!!!!!!!!!!! (1 Reply)
Discussion started by: dindan100
1 Replies

7. UNIX for Dummies Questions & Answers

Tape Drive on Unix 7.1.1

I am trying to install a tape drive on this system (Unix 7.1.1) where will I start? 1. Do I need to load the driver on the on board scsi? How? 2. Is there a driver for the tape drive itself? Things done: 1. Terminated the device on the controller board. (4 Replies)
Discussion started by: a4tech
4 Replies

8. UNIX for Dummies Questions & Answers

Athlon XP + Linux/Unix? and RAM Question

Has anyone had any experience with this new processor and its compatability with Linux/Unix? How did it preform comared to regular Athlons and P4's? I also have one other question. I plan on buying a new dell and fiddling left and right with it. Which type of RAM is better, RDRAM or... (3 Replies)
Discussion started by: KyPeN
3 Replies

9. UNIX for Dummies Questions & Answers

UNIX for 386 SX 4MB RAM

How, where from and which UNIX or LINUX can I download so that I can use it normally working on 386 SX 4MB RAM. I want to use only its basic functions and C and C++ compiler on it. I need it for my studies. P.S I need a stable UNIX or LINUX including a full set of functions of C... (4 Replies)
Discussion started by: Traiancho
4 Replies
Login or Register to Ask a Question