looking for solution to improve process replicate files to remote loc.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users looking for solution to improve process replicate files to remote loc.
# 1  
Old 09-20-2006
looking for solution to improve process replicate files to remote loc.

looking for solution to replicate 1.5GB files to a remote location...

Currently, this process looks like the following:

move 1.5GB files into a staging area.
compress files.
rsync files to remote server.
remove compressed files.


I have performed some timings, and compress seems more efficent over gzip.

Is there an efficient way to move and compress in a single step?
wondering how to improve process listed above...
thanks
# 2  
Old 09-20-2006
lzop might be better for compression of enormous files than gzip or compress. It's compression ratio isn't as good but it's lightning fast.

I often do this sort of thing but over a local area network with udpcast, when I replicate whole drives with it:
Code:
# Source computer
dd if=/dev/hda | lzop -c | udp-sender
# Recieving computer(s)
udp-reciever | lzop -d | dd of=/dev/hda

but udpcast uses multicasting, which won't go across the internet.

I occasionally use my own hacks, tcp_pipe or faf to handle piping through sockets across the internet but these are, well, hacks that I don't reccomend one use in a production environment. If there are any "normal" equivalents to these programs, I don't know them. Anyone?
# 3  
Old 09-20-2006
compressing the file appears tobe more efficient then gzip, but does not compress as much:

# time compress bigFILE.arc

real 2:29.3
user 1:46.6
sys 23.2

# ll
-rw-r----- 1 root sys 549384653 Sep 20 10:10 bigFILE.Z

1566427136-549384653
1017042483 amt. compressed
1017042483/149 sec

6825788.47 per sec


gzip file:

# time gzip bigFILE

real 5:02.2
user 4:21.2
sys 22.5
# ll
total 778816
-rw-r----- 1 root sys 398751664 Sep 20 10:10 bigFILE.gz

1566427136-398751664
1167675472 amt. compressed
1167675472/302 sec

3866475.07 per sec


But when sending them across the pipe, my timings show an improvement when the files are uncompressed (using rsync):

receiving file list ...
1 file to consider
bigFILE.Z
549384653 100% 539.48kB/s 0:16:34 (xfer#1, to-check=0/1)

sent 42 bytes received 549569234 bytes 551499.52 bytes/sec
total size is 549384653 speedup is 1.00

real 16m35.83s
user 0m10.71s
sys 0m30.54s



bigFILE
1566427136 100% 2.08MB/s 0:11:58 (xfer#1, to-check=0/1)

sent 42 bytes received 397960981 bytes 552340.07 bytes/sec
total size is 1566427136 speedup is 3.94

real 12m0.30s
user 0m56.81s
sys 0m28.56s



So now, I'm leaning towards sending files uncompressed, and performing a gzip at the remote box...
thanks,
manny
# 4  
Old 10-03-2006
gzip has a great option....you should experiment with it. you can set the compression rate with gzip with switches...

for ex.
gzip -9 file

-9 indicates the highest level of compression. I think you can choose from 1-9. It is possible to compress a gigabyte of text into like 10 megs. So maybe you can deal with the time of compression and catch up on time in terms of transit. ftp of 10 megs is waaaaay faster than a larger 1 gb file.You will have to experiment and see for yourself.

-S
# 5  
Old 10-03-2006
Quote:
Originally Posted by mr_manny
Is there an efficient way to move and compress in a single step?
You could compress to stdout and pipe it to ssh/rsh and redirect to a file at the other side.
# 6  
Old 10-04-2006
Currently leaning towards rsync:

since rsync performs compression in-flight, it likes uncompressed files:

stats on sending compressed file:
(your mileage may vary Smilie )

551499.52 bytes/sec
total size is 549384653 speedup is 1.00

real 16m35.83s
user 0m10.71s
sys 0m30.54s


uncompressed file:

1566427136 100% 2.08MB/s 0:11:58 (xfer#1, to-check=0/1)

sent 42 bytes received 397960981 bytes 552340.07 bytes/sec
total size is 1566427136 speedup is 3.94

real 12m0.30s
user 0m56.81s
sys 0m28.56s


Maybe the best both worlds?
rsync uncompressed file, and gzip on remote box where duration and load is not an issue...

your input is appreciated Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Do we have generic solution get process start time in AIX & Linux

I wish to get the process start time on AiX and Linux using the same command / script. I'm able to get the process start time in Linux using the below command: cat /proc/<pid>/stat | grep Modify The same does not work for AiX 6.1 systems. Can you please let me know the command to get... (4 Replies)
Discussion started by: mohtashims
4 Replies

2. Shell Programming and Scripting

Bash script search, improve performance with large files

Hello, For several of our scripts we are using awk to search patterns in files with data from other files. This works almost perfectly except that it takes ages to run on larger files. I am wondering if there is a way to speed up this process or have something else that is quicker with the... (15 Replies)
Discussion started by: SDohmen
15 Replies

3. Shell Programming and Scripting

Improve script - slow process with big files

Gents, Please can u help me to improve this script to be more faster, it works perfectly but for big files take a lot time to end the job.. I see the problem is in the step (while) and in this part the script takes a lot time.. Please if you can find a best way to do will be great. ... (13 Replies)
Discussion started by: jiam912
13 Replies

4. Shell Programming and Scripting

Replicate remote directory to local directory with ftp

I have system that generate files every 1 hours , i only have ftp connection from my local server to remote . $ ls -al -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0800 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.0900 -rw-r--r-- 1 water None 0 Feb 7 18:09 a.1000 is there any perl / php... (3 Replies)
Discussion started by: before4
3 Replies

5. Shell Programming and Scripting

shell script to replicate the log files from one location to another in real time

Hi, On the server, we have app log files in this location /app/logs/error.log On the same server, in a real time, we would like to replicate that into /var/ directory. if someone has already done this, please share the script. Thanks in advance. (4 Replies)
Discussion started by: lookinginfo
4 Replies

6. Programming

Counting LOC in C

Hi Do you know where I can find any utility that counts lines of code in a C program, accurately? The ones that count the semicolons does not give correct results. Thanx Andonis Matsakas (1 Reply)
Discussion started by: amatsaka
1 Replies
Login or Register to Ask a Question