- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Copy takes too much time.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 01:37 AM
тАО10-27-2003 01:37 AM
Copy takes too much time.
I have copied a directory recursively, which is size of 198Mb and directory was containing near 198000 files. It took near 8 Hours to copy.
The command used,
# cp -R /siemens .
Both the source and destination were on same file system.
OS : HPUX 11.00
What would be the copy speed? Why it took this much time. Any pointer.
Thanks in advance,
Regards,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 01:43 AM
тАО10-27-2003 01:43 AM
Re: Copy takes too much time.
For this type of situation I always use cpio:
find /siemens -print |cpio -pdumxl .
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 01:49 AM
тАО10-27-2003 01:49 AM
Re: Copy takes too much time.
You mean to say, what ever time taken by cp is normal?
Regards,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 01:50 AM
тАО10-27-2003 01:50 AM
Re: Copy takes too much time.
that is hard to say without knowing the kind of hardware and software that your using.
Why it took this much time
1) a flat directory, 198000 files all in the same directory is going to slow things down.
2) small files, your average file size seems to be about 1k. lots of small files are slower then a few large ones.
3) possible hitting the same disk drive (source and destination were on same file system), if you are your causing the disk heads to more back and forth on reads and writes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 03:46 AM
тАО10-27-2003 03:46 AM
Re: Copy takes too much time.
cp -r /admin /admin/data
could loop, maybe never finish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 04:23 AM
тАО10-27-2003 04:23 AM
Re: Copy takes too much time.
cd /orig/dir1 ; tar cf - . | ( cd /orig/dir2 ; tar xf - )
Simple cp is not really meant for that functionality imho. cpio and tar are meant to handle large numbers of files.
By your statement you had 198MB and 190k files... Is each file 1mb in size? If you are using -r recursive, make sure the destination is not a sub-directory of the dir you are cp'ing from, or you will have a looping command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 04:24 AM
тАО10-27-2003 04:24 AM
Re: Copy takes too much time.
No points here...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2003 04:37 AM
тАО10-27-2003 04:37 AM
Re: Copy takes too much time.
cd /siemens
find . | cpio -pudlmv /newdirectory
Be sure to cd to the old location and use find . rather than find /siemens to put the files in the right location. Many users leave out -v which shows the progress, and others put in -x which should never be used (device files should never be copied except in very unusual situations). This syntax will maintain ownership and permissions and proceed much faster than cp. NOTE: It will fail to copy files larger than 2 Gbytes (largefiles).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 01:42 AM
тАО10-28-2003 01:42 AM
Re: Copy takes too much time.
fsadm -F vxfs -D
fsadm -F vxfs -d
Hope that made some sense. Its still early and I haven't had any caffine yet.
David