-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abnormally slow IO performance on CIFS network share #7480
Comments
2.0px branch unusable, bad. don't bother with it! it will never be good |
@nagyimre1980 Why do you think that? |
@constantins2001 Do you have a comparison with version 1.2 of the library? |
How about #6561 qbittorrent/qBittorrent#18983 qbittorrent/qBittorrent#16043 and many more performance issues that I didn't comment on, so it's hard for me to track them down. Is that not enough to consider this branch bad? |
@stalkerok Are these problems compared to the old version 1.2 of the library? Or are they general problems? |
These are problems only 2.0.x |
@arvidn Too many changes at one time (1.2->2). Is it possible to roll back the change of disk write type? (memory mapped files) |
@stalkerok You need to test 1.2 torrents and 2.0 torrents on Url-seeded torrent files. This will rule out problems with other torrent mechanisms. This is pure write speed. Use this ready-made torrent file. |
|
I reverted back to version 2 due to the following issue with 1.2.19: Better slowish write speeds than an unstable experience, but still I'd love to use the full potential of my platform... |
https://user-images.githubusercontent.com/63958081/259389632-14476ece-989c-4394-b232-38e9da440111.png |
@stalkerok Problem with the upload or download speed? |
same issue on 1.2.19, only downloads directly to the share are fast |
Looks like Arvin has abandoned library development. I don't know why. Maybe he has a creative crisis because of the wrong transition to version 2.+. It must be hard to develop a program and not see the results of its work. |
Using 2.x with NFS share. Upload/download rates above 100 MBit/s are no problem. I think it's working fine with the right OS and/or kernel version. |
NFS and SMB seem to be very different in many regards |
Update: |
Yeah, it's a bit silly but that's expected. Remember each time you're doing this you're incurring a network roundtrip which can be multiple ms at the very least. Writing sequentially is also a very different from writing "random" blocks, especially with that latency involved. I saw you turned your dirty to nothing which was obviously a mistake on your part. But yeah, mmap is never going to be as performant as the classic C linux api which 1.2 used. The future remains io_uring here for linux. The backends are interchangeable, so 2.0 can recover from this (and be baller if the networking is moved as well). Just takes time. |
Shouldn't matter, in combination with the write cache the 1 Gbit/s connection should easily be saturated (see OP).
Due to the same reasons as above I also don't think this is the issue. The move operation is just as slow as the download using random blocks (see OP).
Only on the old libtorrent, it crashed my system with the default settings. |
@paxter Can you share your configuration with us? |
libtorrent 2.0 defaults to using memory mapped files for disk I/O. This turned out to be sub-optimal in a lot of common cases (perhaps most cases). My top priority is to implement a new disk I/O subsystem in In the meantime, you may want to try to |
@arvidn It would be better to do DHT development (switch to tcp and broadcast traffic through other nodes (as in libp2p)). But if you'd rather work with the disk subsystem, then ok. |
patches are welcome |
I'm developing more important programs. Higher level. And it would be easier for me to do it if you improved the DHT. |
Okay. I realize it's very complicated. So just help me on my tickets. I think that should be enough. |
Which configuration? It's a default nfs share on bsd. Nothing special. |
@arvidn, why can't the old disk I/O subsystem from 1.2 be used in 2.1, which works fine, if not by default, then at least as configurable parameters? You can't guarantee that the new disk subsystem will be better and there will be no problems with it. |
the p stands for position, which allows you to avoid the file pointer position and read and write to certain segments (as long as append isn't used). This is a general POSIX backend that was standardised in 2001 (not nearly as fast or efficient as io_uring or IoRing) - that should still be better if fully pipelined than the older one despite being 22 year-old technology. The risk here is the local cache, that's going to dump into the page cache, then finally spooled to disk. People are having problems with the classic backend with multiple files not being committed to the page cache when cross-seeding (same data, different torrents). I'm unclear/concerned the local cache is going to still hamper these efforts, and the locking isn't going to be as tight as one would expect. the real struggle for NVMe boxes right now (on 1.2) is the fact the network is single threaded. There's been custom TLS crypto and similar shoved in there that just kills the entire session if it's toggled on. io_uring "fixes" this as well by allowing you to do all that crypto for the next set of work between submissions (which could be threaded or not). Anyway, it sounds like 2.1 is the next 1.2, and 2.0 will hopefully be forgotten in short order (it may even take calling it 3.0, but if there's a large problem when that's done it won't be possible to recover from this). |
This is driving me crazy as well. Literally tried everything, but the speeds are terrible. Wish I could just go around the NAS, but I can’t. |
I encounter the very same issue. When I use qBittorrent via docker-compose and want it to access a SMB/CIFS share when everything is super super slow:
Did I do something wrong, or is it just qBittorrent not handeling SMB/CIFS Shares properly? qbittorrent/qBittorrent#19407 (comment)
I dont think it is a niche issue. Storage these days can be very cheap, or expensive. If you just buy/rent storage, it is cheap. If you buy a server with more ssd-raid storage it will be expensive, but you actually will never use the ssd-raid storage speed. So I think it would make a lot of sense to improve the handling/speed of SMB shares. |
Yes, I see these 5MB/s limits aswell. When I move stuff on my own server I see about 500MB/s, but when to the SMB share it drops to 5MB/s. Anyway, I can access the SMB share from my server with about 200-250MB/s. So the share is not the bottleneck! |
I am trying to solve this problem at qBittorrent side right now. qbittorrent/qBittorrent#21300 |
How can one test this? |
This comment was marked as outdated.
This comment was marked as outdated.
@HanabishiRecca I am using Simple pread/pwrite in qBittorrent 5.0.1. I can say memory usage is a lot better than before, like really better, so thanks a lot. On topic with this version of QB and Simple pread/pwrite, it took 40 seconds to move a 10GB torrent file from local SSD (incomplete dir) to an NFS share (complete dir) (~285MB/s) which is roughly the speed of my local SSD. |
Cool. There are more not yet released optimization patches on libtorrent side. |
Versions
libtorrent version (or branch): 2.0.9-r2
platform/architecture: ARM64
What is the problem?
IO on mounted CIFS (SMB) network share are abnormally low.
This indicates qBittorrent has drastically slower speeds when moving downloads/downloading to network shares compared to a manual move operation.
Steps to reproduce
mount.cifs -o user=<XXX>,pass=<XXX>,cache=loose,actimeo=120,fsc //<URL>/<share> <mountpoint>
<mountpoint>
Additional context
I'll be happy to provide a full testing environment, just contact me directly.
Related to qbittorrent/qBittorrent#19407
The text was updated successfully, but these errors were encountered: