Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an jailbroken iPod Touch, and I have the afc2add package. When I plug it into my ubuntu laptop, it automounts my iPod's Media directory, as well as the app file sharing folders too. When I use Nautilus to transfer a file into the Media folder, it peaks at about 5MB/s. However, when I use a terminal to copy a file to the ~/.gvfs/Matt's iPod folder [In Nautilus, it shows up as "Matt's iPod"], I have only seen it go up to about 2MB/s.

Can anyone give any clues as to why it is over half slower to cp a file instead of using Nautilus's GUI copy?

By the way, the I can tell how fast it is going with a terminal copy, I have a script with pv [In a nutshell, it is: pv $1 > $2], and that was going about 1.5MB/s. So I also tried cp, and set up a loop to du the file every second, and it jumped up somewhere near 2 MB every second.

share|improve this question
    
Can also post the total turn-around times in both the cases? –  samarasa Sep 8 '11 at 2:22
    
Strangely, my case is exactly the opposite: cp is 8x faster than copying with Nautilus. I envy you :) –  marcioAlmada Sep 6 '13 at 1:53

1 Answer 1

up vote 13 down vote accepted

Nautilus would be going through fewer layers of indirection, which could account for the difference.

Nautilus is a native gvfs application, so it communicates with the gvfs backends directly.

In contrast, cp is talking to the kernel via a FUSE file system mounted at ~/.gvfs, which is handled by the gvfs-fuse-daemon process, which in turn talks to the gvfs backends. Impedance mismatches between the POSIX API and gvfs might account for the less efficient transfers.

You might be able to get similar performance on the command line using the gvfs-copy command from the gvfs-bin package, copying to the appropriate URL.

share|improve this answer
    
Oh my goodness. It went up to 11MB/s for a second, and averaged about 6 or 7MB/s afterwards! Thanks! –  Matt Sep 8 '11 at 15:08
1  
That is good to hear. The FUSE interface to gvfs is intended more as a backward compatibility shim that allows all applications to access files rather than being the preferred method of access. –  James Henstridge Sep 9 '11 at 2:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.