JCIFS: file retrieval is too slow to be usable

后端 未结 7 1496
北海茫月
北海茫月 2020-12-05 05:57

I was just testing JCIFS for accessing Windows shares. It is very slow to the point of being completely unusable.

import jcifs.smb.*;

class First {
    publ         


        
7条回答
  •  無奈伤痛
    2020-12-05 06:27

    I know this is an old question, but for anyone else who has tried the other solutions to no avail:

    In my case, I was able to track the slowdown to jcifs' heavy use of SecureRandom, which blocks if /dev/random reports insufficient entropy.

    Installing rng-tools and configuring and enabling rngd brought performance up to acceptable levels.

    You can check the available entropy (on RHEL at least) with the following command:

    cat /proc/sys/kernel/random/entropy_avail
    

提交回复
热议问题