Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Very Slow Captive NTFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bluni
n00b
n00b


Joined: 27 Jan 2006
Posts: 29

PostPosted: Sun Apr 09, 2006 9:23 am    Post subject: Very Slow Captive NTFS Reply with quote

I have a tri-boot with hda my nfs winxp install, hdb1-3 is gentoo and hdb4 is ntfs for vista. I have captive running and I can read/edit/write files, but sometimes it runs dog slow. For 10 seconds it will lock up whatever program is trying to access the drive (amarok, konqueror, mplayer, etc.). Eventually the program will wake up again, but most of the problems lie in just browsing the folders and files. Once a movie starts in mplayer or song in amarok, it won't skip, but browsing the filestructure and writing takes a while.

It particularly slows down firefox and thunderbird (I have soft links to the ntfs drive so I can have the same mail store in both(all three actually :-D ) OSes). Any ideas how I can make it more responsive and overall faster? The drives don't spin down, so it's not normal spin up times or anything like that. Here's relevant specs:

* Two IDE 80 GB 7200 rpm drives - good condition (SMART tests, i guess i could do full disk fitness tests, but i never have the problems in winxp or vista)
* P4 3.0 Ghz w/ SMP (HT)
* 1 gig PC 2700 RAM
* 1 gig swap space barely barely touched
* ~x86 portage
* KDE 3.5, xgl, compiz, modular x
* emerge --sync && emerge -DNu world performed often
* 2.6.16-r1 gentoo-sources manual config with NTFS read and write support built into the kernel (they are left from before I learned the limits of the kernel NTFS "write" O_o )

Thanks for your help,

Brian
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Sun Apr 09, 2006 9:51 am    Post subject: Reply with quote

Unfortunately, captive ntfs is slow. It uses the Windows filesystem driver in the same way Wine does for Windows executables: it emulates required layers of Windows NT. It's different in that Wine only needs to replicate userspace parts of NT, whereas captive ntfs needs to do some kernel stuff too. All this emulation and translating Windows calls to Linux and Linux calls to Windows slows down the overall process.
Back to top
View user's profile Send private message
bluni
n00b
n00b


Joined: 27 Jan 2006
Posts: 29

PostPosted: Sun Apr 09, 2006 5:48 pm    Post subject: Reply with quote

Is there any way the native kernel NTFS write will ever do real NTFS writing? Or is captive the accepted answer?

I tech support systems (hence the tri-boot) for money on the side and you know a lot more if you do normal activities those operating systems, and I want to explore the wonderment that is Linux :).

Thanks,

Brian
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Sun Apr 09, 2006 8:31 pm    Post subject: Reply with quote

bluni wrote:
Is there any way the native kernel NTFS write will ever do real NTFS writing? Or is captive the accepted answer?

I tech support systems (hence the tri-boot) for money on the side and you know a lot more if you do normal activities those operating systems, and I want to explore the wonderment that is Linux :).

Thanks,

Brian

Possibly, although since Microsoft has not released the specifications for NTFS, it all depends on reverse engineering it.
Back to top
View user's profile Send private message
ebichu
Apprentice
Apprentice


Joined: 03 Jul 2002
Posts: 231
Location: Manchester, England

PostPosted: Sun Apr 09, 2006 8:35 pm    Post subject: Reply with quote

Captive isn't emulating Windows calls - it's actually running Windows code (ntfs.sys), but it's running it in a user-space process. This is slow because every time some process accesses the NTFS filesystem a process context switch occurs for the 'captive' process to perform the filesystem operation and another process context switch back to the original process afterwards. Also there is more data being passed back and forth between user and kernel space than there is for a normal kernel mode filesystem.

The only way to speed captive up would be for it to support loading the Windows driver into kernel space (as is done for ndiswrapper), but I don't know how likely that is to happen!
_________________
Ebichu wa chiizu ga daisuki dechu!
Back to top
View user's profile Send private message
Parasietje
Apprentice
Apprentice


Joined: 25 Jan 2004
Posts: 194

PostPosted: Mon Apr 10, 2006 1:20 am    Post subject: Reply with quote

IMHO, it is unlikely that Microsoft will ever open up the NTFS file system specifications. You could help spamming the "port25" website asking for this of course ;-)

To answer your question: Captive is indeed plain slow. Maybe you could renice the captive process? That way it would at least get more CPu power.
Back to top
View user's profile Send private message
kmj0377
Guru
Guru


Joined: 26 Sep 2003
Posts: 397

PostPosted: Mon Apr 10, 2006 1:39 am    Post subject: Reply with quote

ebichu wrote:
Captive isn't emulating Windows calls - it's actually running Windows code (ntfs.sys), but it's running it in a user-space process. This is slow because every time some process accesses the NTFS filesystem a process context switch occurs for the 'captive' process to perform the filesystem operation and another process context switch back to the original process afterwards. Also there is more data being passed back and forth between user and kernel space than there is for a normal kernel mode filesystem.

The only way to speed captive up would be for it to support loading the Windows driver into kernel space (as is done for ndiswrapper), but I don't know how likely that is to happen!

http://www.jankratochvil.net/project/captive/doc/About.pm
Quote:
Challenges of the Project




The ultimate goal of this project is definitely the
free implementation of reliable read-write NTFS filesystem driver. This project chose to
solve this problem in the style of Wine project by using the original binary
ntfs.sys and emulating all the required layers of
Microsoft Windows NT for it.




Unfortunately this effort is tainted by only partial and generally
insufficient documentation of API between filesystem driver
(ntfs.sys) and the
Microsoft Windows NT
("W32"
in the following text) kernel ntoskrnl.exe. Note
that this API is a different than the one being used in the Wine project
since Wine implements only the user space
part of W32.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum