Skip to content

rqbit spends significant disk I/O to save DHT cache #310

@izderadicka

Description

@izderadicka

I'm running rqbit on linux "server" as service (using latest Docker image] and I see significant disk I/O related to rqbit, even if nothing is "happening" - no active torrents.

Command is simple/default: /bin/rqbit server start /home/rqbit/downloads
rqbit is far most active process for disk IO - disk writes - see iotop - accumulated over 10 secs:

    PID  PRIO  USER     DISK READ DISK WRITE>    COMMAND                                                                                            
2528676 be/4 root          0.00 B   2021.00 K rqbit server start /home/rqbit/downloads
    371 be/3 root          0.00 B    356.00 K systemd-journald
   3261 be/4 999           0.00 B     46.00 K postgres: stats collector process

with iostat it looks like ongoing write is about 200 KB/s continuously

Looking with strace what's going on:

$ sudo strace -p 2528676 -f -e trace=file,write 
strace: Process 2528676 attached with 6 threads
[pid 2528698] open("/home/rqbit/cache/com.rqbit.dht/dht.json.tmp.1", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 19
[pid 2528698] write(19, "{\"addr\":\"0.0.0.0:55022\",\"table\":"..., 8163) = 8163
[pid 2528698] write(19, "3caad6911d8e95475da6a6dc498ab3d8"..., 8191) = 8191
...
[pid 2528698] rename("/home/rqbit/cache/com.rqbit.dht/dht.json.tmp.1", "/home/rqbit/cache/com.rqbit.dht/dht.json") = 0
[pid 2528698] write(19, "2d721ae6fa4a2a24f2bd3e1886e91371"..., 315) = 315
...

File /home/rqbit/cache/com.rqbit.dht/dht.json is rewritten every ~ 3 second. Size of file is ~ 200 KB.

And this generates notable load to disks.

I have not looked for CLI options, if it can be disabled - will look, but as default option it seem to me bit aggressive from disk IO perspective.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions