The Fastest for copy huge data


 
Thread Tools Search this Thread
Operating Systems Solaris The Fastest for copy huge data
# 1  
Old 09-16-2014
The Fastest for copy huge data

Dear Experts,

I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers?

I already tried using Rsync and tar command. But using these command is too long.

Please advice.


Thanks
Edy
# 2  
Old 09-16-2014
You could copy the filesystem blocks and turn that into a filesystem on the other server, or use techniques of the underlying storage hardware (if it is on a SAN), or use a previous backup to restore on the other server and use rsync for the last bit.

If it is on ZFS then you could use that to take a snapshot and send it to the other side..

Last edited by Scrutinizer; 09-16-2014 at 01:40 AM..
# 3  
Old 09-16-2014
How much data? What is your network bandwidth? What's "too long"? How fast do you need the data to be copied?

What kind of network and/or storage hardware do you have?

If you're bandwidth limited, the protocol doesn't matter much unless it's really inefficient.

If it's a LOT of data - hundreds of gigabytes or maybe even more - the fastest way is probably to put a new hard drive into the source server, copy the data to the new hard drive and then physically move the hard drive to the target server.
# 4  
Old 09-16-2014
Quote:
Originally Posted by edydsuranta
Dear Experts,

I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers?
What is a "mio"?

If your connection isn't saturated, it sounds like you have folders containing hundreds of thousands of tiny files. This is never fast.

The speed limit on creating/deleting files in crowded directories is is an operating system limitation. The problem is that when a file entry in a folder is created or deleted, other things have to wait for it. And the larger a folder is, the more time it takes to add a file since its name has to be checked against the others for duplicates and consistency.

You cannot get around this limit using C, Perl, assembly language, or any other "creative" solution. It takes faster disks and CPU's to speed up a file tree that inefficient.

Last edited by Corona688; 09-16-2014 at 02:09 PM..
# 5  
Old 09-16-2014
Have you tried using tar to create a tarball, then copying the tarball to the other server and untaring it? Newer OS's have a --compress option, which might help.

However you copy it, you may want to copy over the directories in different threads, hence you get some level of parallel. You can do a find to get the folder names, then split up the list into separate files and have a different process migrate each folder.
# 6  
Old 09-16-2014
Quote:
Originally Posted by gandolf989
Have you tried using tar to create a tarball, then copying the tarball to the other server and untaring it? Newer OS's have a --compress option, which might help.
Read my above post to understand why this is unlikely to help.

Quote:
However you copy it, you may want to copy over the directories in different threads, hence you get some level of parallel.
Read my above post to understand why this is unlikely to help. Disks, and especially folders, are not parallel.
# 7  
Old 09-16-2014
IF you have an ssh connection and have set up ssh-keys for an account that can write to /.
Where /parent is the the path primary member of /parent/path/to/files/

Code:
tar cf - ./path/to/files | ssh special_user@remoteserver ' cd /parent && tar xBf - '

This runs in one about half of the time of:
Code:
tar cf tarfile.tar
scp tarfile.tar remoteserver:
ssh remoteserver ' tar xf tarfile.tar'


Last edited by jim mcnamara; 09-16-2014 at 02:31 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Phrase XML with Huge Data

HI Guys, I have Big XML file with Below Format :- Input :- <pokl>MKL=1,FN=1,GBNo=B10C</pokl> <d>192</d> <d>315</d> <d>35</d> <d>0,7,8</d> <pokl>MKL=1,dFN=1,GBNo=B11C</pokl> <d>162</d> <d>315</d> <d>35</d> <d>0,5,6</d> <pokl>MKL=1,dFN=1,GBNo=B12C</pokl> <d>188</d> (4 Replies)
Discussion started by: pareshkp
4 Replies

2. Shell Programming and Scripting

Aggregation of huge data

Hi Friends, I have a file with sample amount data as follows: -89990.3456 8788798.990000128 55109787.20 -12455558989.90876 I need to exclude the '-' symbol in order to treat all values as an absolute one and then I need to sum up.The record count is around 1 million. How... (8 Replies)
Discussion started by: Ravichander
8 Replies

3. Red Hat

Disk is Full but really does not contain huge data

Hi All, My disk usage show 100 % . When I check “df –kh” it shows my root partition is full. But when I run the “du –skh /” shows only 7 GB is used. Filesystem Size Used Avail Use% Mounted on /dev/sda1 30G 28G 260MB 100% / How I can identify who is using the 20 GB of memory. Os: Centos... (10 Replies)
Discussion started by: kalpeer
10 Replies

4. UNIX for Dummies Questions & Answers

Copy huge data into vi editor

Hi All, HP-UX dev4 B.11.11 U 9000/800 3251073457 I need to copy huge data from windows text file to vi editor. when I tried copy huge data, the format of data is not preserverd and appered to scatterd through the vi, something like give below. Please let me know, how can I correct this? ... (18 Replies)
Discussion started by: alok.behria
18 Replies

5. AIX

Copy huge files system

Dear Guy’s By using dd command or any strong command, I’d like to copy huge data from file system to another file system Sours File system: /sfsapp File system has 250 GB of data Target File system: /tgtapp I’d like to copy all these files and directories from /sfsapp to /tgtapp as... (28 Replies)
Discussion started by: Mr.AIX
28 Replies

6. Solaris

The FASTEST copy method?

Hi Experts, I've been asked if there is a fast way to duplicate a file(10GB) and zip it at the same time. The zipped file would be FTP'd.....management is asking this. Maybe there is a better method all together? any ideas? CP will not cut it. Thanks in advance Harley (1 Reply)
Discussion started by: Harleyrci
1 Replies

7. UNIX for Dummies Questions & Answers

copy and paste certain many lines of huge file in linux

Dear All, I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine. the contain of file like as follow: ... dump annealling all custom 10 anneal_*.dat id type x y z q timestep 0.02 run 200000 Memory... (2 Replies)
Discussion started by: ariesto
2 Replies

8. UNIX for Advanced & Expert Users

A variable and sum of its value in a huge data.

Hi Experts, I got a question.. In the following output of `ps -elf | grep DataFlow` I get:- 242001 A mqsiadm 2076676 1691742 0 60 20 26ad4f400 130164 * May 09 - 3:02 DataFlowEngine EAIDVBR1_BROKER 5e453de8-2001-0000-0080-fd142b9ce8cb VIPS_INQ1 0 242001 A mqsiadm... (5 Replies)
Discussion started by: varungupta
5 Replies

9. Shell Programming and Scripting

How to extract data from a huge file?

Hi, I have a huge file of bibliographic records in some standard format.I need a script to do some repeatable task as follows: 1. Needs to create folders as the strings starts with "item_*" from the input file 2. Create a file "contents" in each folders having "license.txt(tab... (5 Replies)
Discussion started by: srsahu75
5 Replies

10. UNIX for Dummies Questions & Answers

fastest copy command

wich is the fastest command in HP-UX to copy an entire disk to dat tapes, or even disk to disk? thanks (0 Replies)
Discussion started by: vascobrito
0 Replies
Login or Register to Ask a Question