FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sun Jun 20, 2021 06:50



Post new topic Reply to topic  [ 5 posts ] 
ntfsclone goes slower as image creation is ongoing 
Author Message

Joined: Sun Jan 30, 2011 18:54
Posts: 14
Post ntfsclone goes slower as image creation is ongoing
I wanto to make a backup of this partition without special format, in order to be able to read it later as a file om any other software. I have 1GB of RAM and a Pentium M 1.73GHz, and about at 60% completion it starts to go really slow, with cpu usage about 85% and only 16 MB of RAM left. Surprisingly, it doesn't use swap. Finally I cancelled the image creating and used dd with bs=4k. Does someone know why this happens?


Code:
ntfsinfo -m /dev/sda2
Volume Information
        Name of device: /dev/sda2
        Device state: 11
        Volume Name:
        Volume State: 1
        Volume Version: 3.1
        Sector Size: 512
        Cluster Size: 4096
        Volume Size in Clusters: 10066943
MFT Information
        MFT Record Size: 1024
        MFT Zone Multiplier: 1
        MFT Data Position: 24
        MFT Zone Start: 786432
        MFT Zone End: 2044799
        MFT Zone Position: 786432
        Current Position in First Data Zone: 2044799
        Current Position in Second Data Zone: 0
        LCN of Data Attribute for FILE_MFT: 786432
        FILE_MFTMirr Size: 4
        LCN of Data Attribute for File_MFTMirr: 2
        Size of Attribute Definition Table: 2560
FILE_Bitmap Information
        FILE_Bitmap MFT Record Number: 6
        State of FILE_Bitmap Inode: 0
        Length of Attribute List: 0
        Attribute List: (null)
        Number of Attached Extent Inodes: 0
FILE_Bitmap Data Attribute Information
        Decompressed Runlist: not done yet
        Base Inode: 6
        Attribute Types: not done yet
        Attribute Name Length: 0
        Attribute State: 3
        Attribute Allocated Size: 1261568
        Attribute Data Size: 1258368
        Attribute Initialized Size: 1258368
        Attribute Compressed Size: 0
        Compression Block Size: 0
        Compression Block Size Bits: 0
        Compression Block Clusters: 0


About ntfsprogs:

Code:
apt-cache show ntfsprogs
Package: ntfsprogs
Priority: optional
Section: otherosfs
Installed-Size: 712
Maintainer: Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: David Martínez Moreno <ender@debian.org
Architecture: i386
Source: linux-ntfs
Version: 2.0.0-1ubuntu4
Depends: libc6 (>= 2.4), libfuse2 (>= 2.8.1), libntfs10 (>= 2.0.0), libuuid1 (>= 2.16), fuse-utils (>> 2.5.0)
Filename: pool/main/l/linux-ntfs/ntfsprogs_2.0.0-1ubuntu4_i386.deb
Size: 275390
MD5sum: 0fcd22e07c6962df8072435e7df3b2cf
SHA1: c5589a02454d5bb9b498f44f5eba598926241ab5
SHA256: ac83f8dbb1e822ac68c4f5c62f9e8f94184877abb9d1dbde3a55e8fdf2e75d82


Note: Ubuntu 10.10


Sun Jan 30, 2011 19:04
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: ntfsclone goes slower as image creation is ongoing
Hi,

Quote:
I wanto to make a backup of this partition without special format, in order to be able to read it later as a file om any other software.

I understand you were cloning to a file. On what kind of file system was the output file ?
Quote:
it starts to go really slow, with cpu usage about 85% and only 16 MB of RAM left. Surprisingly, it doesn't use swap. Finally I cancelled the image creating and used dd with bs=4k. Does someone know why this happens?

ntfsclone only copies allocated clusters, this means that the output file is created as a sparse file.

I have recently discovered a clumsy sequence in ntfs-3g using a lot of CPU when appending data to a big hole. If you were outputting to ntfs, can you test the attached patch ?

Regards

Jean-Pierre


Attachments:
attrib.c.patch.gz [510 Bytes]
Downloaded 794 times
Mon Jan 31, 2011 15:33
Profile

Joined: Sun Jan 30, 2011 18:54
Posts: 14
Post Re: ntfsclone goes slower as image creation is ongoing
jpa wrote:
Hi,

Quote:
I wanto to make a backup of this partition without special format, in order to be able to read it later as a file om any other software.

I understand you were cloning to a file. On what kind of file system was the output file ?
Quote:
it starts to go really slow, with cpu usage about 85% and only 16 MB of RAM left. Surprisingly, it doesn't use swap. Finally I cancelled the image creating and used dd with bs=4k. Does someone know why this happens?

ntfsclone only copies allocated clusters, this means that the output file is created as a sparse file.

I have recently discovered a clumsy sequence in ntfs-3g using a lot of CPU when appending data to a big hole. If you were outputting to ntfs, can you test the attached patch ?

Regards

Jean-Pierre

I was trying to make a backup of a windows 7 partition to an image file, to restore it later in case of data loss or to step back to a previous stage. Furthermore, I didn't use special file format so I can mount the image file as read/write as a loopback device and update it at any time changing its files:
Code:
ntfsclone -o /mnt/SAMSUNG/laptop_hda2.img /dev/sda2


the img file is saved to a USB Samsung hard drive, formatted in NTFS.

About the patch, I could try it within some days, but I need to update about source code compiling and such, I hope I am able to do it

As a note, with
Code:
dd if=/dev/sda2 of=/mnt/SAMSUNG/laptop_hda2_dd.img bs=4k


i got a file that is 100 readable and writable under windows 7 with ImDrive, but I wish i where able to do the same with ntfsclone.


Mon Jan 31, 2011 22:40
Profile

Joined: Sun Jan 30, 2011 18:54
Posts: 14
Post Re: ntfsclone goes slower as image creation is ongoing
I've patched the source code, compiled and installed it, but mount.ntfs-3g keeps consuming a lot of CPU percentage.


Sun Feb 06, 2011 15:29
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: ntfsclone goes slower as image creation is ongoing
Hi,

Quote:
I've patched the source code, compiled and installed it, but mount.ntfs-3g keeps consuming a lot of CPU percentage.

Well, this gives no information about solving your initial problem and whether the proposed patch did what it was supposed to do. It would be better if ntfs-3g were faster and used less CPU, but that is not the issue about which you posted earlier and which I tried to fix.

I understand you did :
Code:
ntfsclone -o /mnt/SAMSUNG/laptop_hda2.img /dev/sda2
dd if=/dev/sda2 of=/mnt/SAMSUNG/laptop_hda2_dd.img bs=4k

In both situations was the target (/mnt/SAMSUNG) an ntfs file system, and only in the first situation did the copy begin to get slow at 65% completion. Now, ntfsclone only copies used clusters, whereas dd copies the full partition to the same target.

So :
1) How full was the target /mnt/SAMSUNG in both situations ?
2) In the first situation, which process is using a lot of CPU (ntfsclone or ntfs-3g) ?
3) Is the CPU usage by ntfs-3g significantly different in both situations ?

Regards

Jean-Pierre


Mon Feb 07, 2011 09:58
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.