gvfsd-gphoto2 when downloading a file from camera loads entire file into memory first, doesn't write it onto hdd simultaneously

Bug #673151 reported by Lukáš Chmela
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: gvfs

gvfsd-gphoto2 loads entire file into memory by first when downloading it from camera and flushes it onto hdd once it is whole in memory unlike gphoto2 that writes onto hdd simultaneously with loading the file from camera.

When downloading a video from my Canon EOS 500D camera, gvfsd-gphoto2 loads it whole into memory by first filling hundreds of MBs or even more of memory (once RAM is full it keeps writing into swap) and writes it onto hdd only when it is entire read in memory. This dramatically slows the computer down and takes a lot more time than with gphoto2 that writes immediately and uses nearly no memory.

I am using Ubuntu 10.10, the latest gvfs package from the repository version 1.6.4-0ubuntu1.1

This is possibly an upstream bug.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, it has been some time without any response or feedback in this bug report and we are wondering if this is still an issue for you with the latest release of Ubuntu the Natty Narwhal, May you please test with that version and comment back if you're still having or not the issue? Please have a look at http://www.ubuntu.com/download to know how to install that version. Thanks in advance and sorry for the late response.

Changed in gvfs (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Lukáš Chmela (lukaschmela) wrote :

Thank you for your response.

I can confirm that this is still an issue with Ubuntu 11.04 using gvfs version 1.8.0-0ubuntu2 from the natty repository.
It is also reproducible on my Acer Aspire 8943G laptop which it slows down quickly after all RAM is used although CPU (4 threads) is idle making that a major usability issue for me (and I believe that not only for me).

I have tried it with one 3GB video file on both computers with exactly the same result. During the copying, gvfsd-gphoto2 loaded the video file into system memory by filling the RAM first, then writing to swap, after it has been whole loaded in system memory, it started to writing it onto HDD (this was the first moment after about 3 minutes of loading it into memory first when the status bar in the "Copying" window moved from 0B somewhere rightwards). All the memory used during the copying has been freed up only after it had been completely written onto HDD. According to system monitor, the gvfsd-gphoto2 listed in the Processes tab used less and less memory with the time as it was being written onto HDD, however, the "History of use of memory and swap space" graph in Sources tab didn't show any difference and all the memory used (3GB) was in fact freed short after the end of the copy operation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gvfs (Ubuntu) because there has been no activity for 60 days.]

Changed in gvfs (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Nikke (nmellegard) wrote :

I am experiencing the same issue on Ubuntu 11.10 with gvfs 1.10.0-0ubuntu1 and libgphoto2-2 version 2.4.11-3.

I am trying to copy about 7Gb of photos and video clips from a camera via USB to an external USB HDD using cut/paste in Nautilus. gvfs-gphoto2 consumes about 2Gb of memory (2.6 Gb VIRT and 1.9Gb RES accoring to top). This also means its diggin into the swap space (about 1.5Gb of swap is used). The system grinds to a virtual halt, and Nautilus crashed twice during the operation forcing me to restart the copying....

Cheers
N

Revision history for this message
Nikke (nmellegard) wrote :

I can also add that the gvfsd-gphoto2 process uses 80-95% of the CPU during the copy operation (top also reports it to use 60% of the memory).

/N

Sean Stoops (brutimus)
Changed in gvfs (Ubuntu):
status: Expired → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Vinicius Seixas (vipseixas) wrote :

I am trying to copy less than 1GB of photos from a Canon camera and gvfsd-gphoto2 process consumes all the memory (4GB) and the swap (2GB), locking the computer before writing a single file to disk.

I am using Ubuntu 12.04 with all updates.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

somebody should send this upstream so that it can be discussed there. I don't think the Ubuntu devs have the time to take the initiative on this one.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

BTW, the same is true for the DAV backend, this doesn't only affect the gphoto2 backend.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.