Bug 113726

Summary: multiple ntfsresize
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Joachim Reichelt <Joachim.Reichelt>
Component: InstallationAssignee: Thomas Fehr <fehr>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: szaka, yast2-maintainers
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST2 log of installation

Description Joachim Reichelt 2005-08-29 06:25:34 UTC
During setup:
After any change in the selection (partitions, What to install, boot options...)
the intsll is running ntfsresize -f -i /dev/... on all ntfs partitions.
This takes ~2 minutes on my 2GHz 100 GB ntfs-fs.
If needed, put the output in a file on /dev/shm.
And each change produces 3 [gzip] <defunct>
Comment 1 Arvin Schnell 2005-08-30 09:51:58 UTC
Please provide YaST2 logs of installation, see:
http://www.opensuse.org/index.php/Bug_Reporting_FAQ#YaST
Comment 2 Szabolcs Szakacsits 2005-08-30 11:19:10 UTC
I can't comment why changes cause running ntfsresize all the time but I can tell
why ntfsresize runs for 2 minutes. 

The performance is always dominated by the disk speed and since ntfsresize
always checks NTFS consistency thus it reads the metadata of all files which are
1 KB. In average people have 100,000-200,000 files thus 100-200 MB needs to be
read from the disk. Having a 20 MB/sec disk, this takes 5-10 seconds. 

If the disk DMA isn't setup properly then the speed could be only 1-2 MB/sec
which means the task will take 50-200 seconds.

Also, if you have 1 million files then the process will take 50 seconds (2
million files => 100 seconds, etc).

One way to get to know the number of files is running 
  
   time ntfsclone --metadata --output metadata.img <ntfs-partition>

and check the "Num of used MFT records" at the end of the output.

hdparm -tT <device> will tell the raw speed of the disk.

Comment 3 Joachim Reichelt 2005-08-31 06:25:15 UTC
Created attachment 48260 [details]
YaST2 log of installation

I did a time ntfsresize ...
I know, that there are lots of files, so I want only ONE, or better NO run of
ntfsresize, as long as these partitons are not affected. Isn't it better to run
ntfsresize only if I want/have to access these disks?
If there is space for SUSE, do not run it at all.
Comment 4 Thomas Fehr 2005-08-31 08:06:24 UTC
The current ntfsresize calls during installation is done since YaST2 needs to know
if a ntfs filesystem is a possible candidate for resizing, this data is needed to
make the proposal, so these calls are there for a reason. 

I was not aware that these calls need such a long time under some circumstances.
I will see how easy it is to improve caching of this information. This is certainly
possible, but I am not sure if the needed changes are not too invasive to do 
at this stage of development for SL 10.0.
Comment 5 Thomas Fehr 2005-09-05 13:51:56 UTC
Added caching of this information to libstorage so that is is at least not
determined multiple times.