#627 Annoying performance issue

1.1
closed-invalid
5
2012-10-13
2012-10-08
Sworddragon
No

I'm using PCManFM 1.0.1. The directory for my personal data (~/data) has currently a total size of ~160 MB. ~/data contains 5 directories and 4 files on the top level. But if I'm opening this directory PCManFM needs ~15 seconds to show the content. During this time the cpu usage of PCManFM is only ~2-4% of one core. If I'm opening the directory again it will be shown instantly. To reproduce this I'm closing the PCManFM window and using "echo 3 > /proc/sys/vm/drop_caches". Interesting is if I'm looking at the attributes of ~/data it shows me ~12 MB. After this ~15 seconds nothing does happen and then it counts up to the ~160 MB.

Discussion

  • Paul Menzel

    Paul Menzel - 2012-10-08

    Maybe try to use `sudo perf record -a` to see where it hangs. Or run it under `strace`. Lastly there is also OProfile.

    It will be easier to discuss if you bring up this topic to the pcmanfm-develop list.

     
  • Lonely Stranger

    Lonely Stranger - 2012-10-08
    • milestone: --> 1.1
    • assigned_to: nobody --> lstranger
     
  • Lonely Stranger

    Lonely Stranger - 2012-10-08

    Thank you very much for recipe how to reproduce it. I'll try to find what goes on.

     
  • Sworddragon

    Sworddragon - 2012-10-08

    I have now used "inotifywait -mr ~/data" to look what is happening. On opening the directory I get "/home/sworddragon/data/ OPEN,ISDIR" and then ~15 seconds nothing happens. After PCManFM has shown the content I get "/home/sworddragon/data/ CLOSE_NOWRITE,CLOSE,ISDIR". At least the files are not recursively accessed.

     
  • Lonely Stranger

    Lonely Stranger - 2012-10-13

    I've done the research. The delay is produced by read() - to determine type of unknown file the libfm reads an initial chunk of it and that takes from 6 to 15 ms for each file in my case. Probably in your case there are other numbers. Unfortunately I have no idea if that could be helped since it's not libfm but file system issue. :(

     
  • Lonely Stranger

    Lonely Stranger - 2012-10-13
    • labels: --> isn't related to libfm or pcmanfm
    • status: open --> pending-invalid
     
  • Sworddragon

    Sworddragon - 2012-10-13
    • status: pending-invalid --> open-invalid
     
  • Sworddragon

    Sworddragon - 2012-10-13

    I have made some research and now it goes really crazy. I have tried to figure out which directories/files are triggering this problem. But after moving all files to another directory the problem appears even if the directory is empty.

    I have made a deeper look how an empty directory can need so many time to be loaded. Curiously PCManFM shows that it needs 12.8 MB. To go sure I have made a look with ls and get this:

    sworddragon@ubuntu:~$ ls -al ~/data_old
    total 13156
    drwx------ 2 sworddragon sworddragon 13455360 Oct 13 17:56 .
    drwx------ 40 sworddragon sworddragon 12288 Oct 13 17:52 ..

    ls doesn't list any files but says there are 13156 files (which explains the long loading time). I have never seen this before. How can there be files which can't be listed? Is this maybe a filesystem issue (ext4)? At least we know this is really not a PCManFM bug. I think I should post this to the related project.

     
  • Sworddragon

    Sworddragon - 2012-10-13
    • status: open-invalid --> closed-invalid
     
  • Lonely Stranger

    Lonely Stranger - 2012-10-13

    Number of 13156 isn't number of files but number of 1k blocks the listed files occupy. And the directory is of size 13455360 despite of files absence. I don't know details of ext4 implementation so I cannot tell for sure if those 13MB shouldn't be read and scanned all for files. If all 13MB (size of directory list in your case) should be scanned then it may explain that loading time.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks