Skip to content

Using version v1.68.0-beta.8044.300851e8b, it is not possible to upload slightly larger files to PikPak #7922

Closed

Description

@cj-neo

What is the problem you are having with rclone?

I just tested v1.68.0-beta.8044.300851e8b and found that as long as the file size is slightly larger, it cannot be uploaded!

I am not sure exactly how large the file needs to be to fail, but currently, files larger than 2.6 GB cannot be uploaded—there is no upload speed or progress.

Additionally, after about ten minutes of uploading, my system started warning me that disk space is running out (I tested the upload using Colab, which originally had at least 70GB of free space).

By the way, I only used the default four parallel uploads(--transfers=4), but the same error still occurred.

Could you please check this? Thank you!

What is your rclone version (output from rclone version)

v1.68.0-beta.8044.300851e8b

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Ubuntu 22.04, 64 bit

Which cloud storage system are you using? (e.g. Google Drive)

pikapk

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

rclone copy -v --stats=3s --transfers=4 --drive-chunk-size=8M --drive-acknowledge-abuse "$src" "$dst"

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. self-assigned this
    on Jun 22, 2024
  2. wiserain commented on Jun 22, 2024

    @wiserain
    Contributor

    Any error or debug logs? Then, it might be downloading files from src and then calculating hash. Reduce --transfers=1 and try same command with debug log -vv.

  3. cj-neo commented on Jun 23, 2024

    @cj-neo
    Author

    I think I have an idea of what the problem is. I copied the file from Google Drive to PikPak, and to calculate the hash code, the beta version first copies the entire file from the remote location to the local system. After downloading the file to the local system and calculating the hash code, the upload begins.

    But please consider the following issues:

    1.Since the file needs to be downloaded before uploading, the transfer time increases significantly. Originally, it was full-duplex operation, meaning downloading and uploading could be done simultaneously. Now, with downloading and uploading handled separately, it becomes half-duplex, requiring separate time calculations for downloading and uploading.

    2.The transfer process changes from a predictable chunk size level operation to an unpredictable file size operation. To avoid errors, a significantly large amount of free disk space might be required locally.

    3.If rclone encounters an unexpected interruption, it seems that the temporary files are not cleared the next time it starts running?

    It is recommended not to change the original transfer logic. If possible, consider my previous suggestion to ignore the hash code and simply proceed with the upload.

    P.S. Due to Google Drive's daily bandwidth limit, I have exhausted today's quota and will have to wait until tomorrow to test the upload based on your suggested method.

  4. cj-neo commented on Jun 23, 2024

    @cj-neo
    Author

    It seems that PikPak has its own way of calculating, which cannot match the hash values obtained by rclone through MD5 or SHA1, thus requiring additional processing. However, the current method is really impractical. While local uploads may not have issues, transferring files between different cloud drives requires fully downloading the files to calculate the hash before uploading them. As I mentioned before, this approach is inefficient, requires a large amount of free disk space, and involves managing temporary files. It also lacks consistency (since other cloud storage services do not operate this way).

  5. cj-neo commented on Jun 23, 2024

    @cj-neo
    Author

    Just now, I reduced the number of transfers to only one and tested the upload for over an hour without encountering any errors. Since there were no errors, I didn't use -vv to log them. Here are some of my observations and thoughts:

    It seems the hash code mismatch issue has been resolved. As shown below, a total of 17 files were uploaded, but only 2 files actually went through the upload process, while the others were skipped because they were detected to already exist on the server.

    However, I discovered what appears to be a bug. If a file is skipped, its size is subtracted from the 'total transfer required' statistic. For example, if a 12.97 GB file is successfully transferred, the original total transfer required of 3.763 TB becomes 3.763 TB - 12.97 GB = 3.75 TB.

    But if the file needs to be uploaded, its size is added to the 'transferred' statistic. So, 25.632 GB becomes 25.632 GB + 12.977 GB = 38.609 GB.

    In principle, the total of 3.763 TB should remain constant and not be deducted. Additionally, regardless of whether the file goes through the upload process, its size should be added to the 'transferred' statistic.

    Also, the average transfer speed always shows 0 B/s, ETA -.

    The progress of remote files being downloaded to the local system is not visible, 0% /12.977 Gi, 0/s.

    Moreover, even though files that already exist on the server are skipped, the actual transfer speed is slower. This is because it still takes time to download the remote file to the local system to calculate the hash code before determining whether to upload it. Additionally, currently processing only one file at a time severely impacts the transfer speed.

    If there is anything else I can help with, please let me know. Thank you for your hard work!

    Transferred:   	   25.632 GiB / 3.763 TiB, 1%, 0 B/s, ETA -
    Checks:               969 / 969, 100%
    Transferred:           17 / 469, 4%
    Elapsed time:   1h15m36.9s
    Transferring:
     *      P/1995 - BluRay.mkv:  0% /12.977Gi, 0/s,
    
  6. wiserain commented on Jun 24, 2024

    @wiserain
    Contributor

    3.If rclone encounters an unexpected interruption, it seems that the temporary files are not cleared the next time it starts running?

    It normally cleans up temporary files. Let me know if you're encountering issues with temporary files not being cleared.

    It also lacks consistency (since other cloud storage services do not operate this way).

    Many cloud storage services require hash for clients when they upload files. The problem with pikpak is that they use their own which is incompatible with others.

    It is recommended not to change the original transfer logic. If possible, consider my previous suggestion to ignore the hash code and simply proceed with the upload.

    As far as I know, there's no way to upload files without a hash code. Uploading with arbitrary ones wouldn't be ideal. I'll see if there are better options for efficient uploads.

  7. wiserain commented on Jun 24, 2024

    @wiserain
    Contributor

    @ncw Any advice on how to fix the accounting issue in such case that uploading is finished early without outbound traffic?

  8. cj-neo commented on Jun 24, 2024

    @cj-neo
    Author

    @ncw Any advice on how to fix the accounting issue in such case that uploading is finished early without outbound traffic?

    I believe the behavior should be consistent. Whether or not the actual upload action takes place, any completed files should be counted towards the transferred data. Additionally, the total transfer required should not be reduced.

    Currently, although the number of transferred files is counted, this number is not accurate because the file sizes can vary greatly. The transferred data volume is the true measure of progress, isn't it?

  9. cj-neo commented on Jun 24, 2024

    @cj-neo
    Author

    I know that PikPak uses its own hash values, but didn't the previous versions allow uploading even if the hash values didn't match? My point is, if you can't provide a null value, just give a fixed one as long as it doesn't match any other file!

    Of course, this method isn't ideal , But it's a workaround. In fact, most larger cloud storage companies wouldn't implement the skip upload feature even if they had the capability.

    Alternatively, you could check : if it's a local file upload, use the current method of checking the hash code. If it's cloud-to-cloud, use the method I suggested.

    In any case, the current method of fully downloading the file before uploading is not feasible. Think about it—if I want to transfer a 100GB file from one cloud to another, but my local disk space only has 70GB left, Even transferring one file at a time wouldn't work!

  10. ncw commented on Jun 26, 2024

    @ncw
    Member

    @ncw Any advice on how to fix the accounting issue in such case that uploading is finished early without outbound traffic?

    Hmm, looking at the code the wrap and unwrap look a bit suspect. Maybe we want to copy the file to disk with the accounting then read the file from the disk without accounting.

  11. wiserain commented on Jun 30, 2024

    @wiserain
    Contributor

    @ncw What happen if we remove the unwrap and wrap before and after buffering? With no unwrap/wrap, although in io.Reader as type of *accounting.Account turns into *os.File, it seems OK with rest of uploading process. Also, the amount of read is already added in accounting while buffering to local temp.

  12. ncw commented on Jul 15, 2024

    @ncw
    Member

    I merged this change now in 846c1ae

  13. wiserain commented on Jul 17, 2024

    @wiserain
    Contributor

    As of 471531e, uploads for files already cached on the server will be significantly faster. Uploads for non-cached files (like those you create yourself) will still require calculating a gcid locally. However, I will not make an exception for this case.

    Now I am working on the accounting issue.

  14. cj-neo commented on Jul 17, 2024

    @cj-neo
    Author

    As of 471531e, uploads for files already cached on the server will be significantly faster. Uploads for non-cached files (like those you create yourself) will still require calculating a gcid locally. However, I will not make an exception for this case.

    Now I am working on the accounting issue.

    Great job

  15. wiserain commented on Jul 20, 2024

    @wiserain
    Contributor

    With 31fabb3, the issue with file transfer statistics should be resolved. Please check! :)

  16. cj-neo commented on Jul 21, 2024

    @cj-neo
    Author

    With 31fabb3, the issue with file transfer statistics should be resolved. Please check! :)

    I’m willing to help with testing, but I’m not very familiar with GitHub and don’t understand the Go programming language. Could you compile a test version of rclone for me to test, like before? Thank you!

  17. ncw commented on Jul 21, 2024

    @ncw
    Member

    @cj-neo this commit is in the latest beta now so you can use that.

  18. cj-neo commented on Jul 21, 2024

    @cj-neo
    Author

    @cj-neo this commit is in the latest beta now so you can use that.

    Thank you so much! I will perform the test later.

  19. cj-neo commented on Jul 21, 2024

    @cj-neo
    Author

    Hello i just tested the latest test version, and the experience was fantastic. Most popular files could be skipped during upload, saving a significant amount of transfer time. It was really surprising!

    However, I have two small suggestions

    Firstly, I suggest renaming 'Server Side Copies' to 'Flash transferred' or 'Instant transferred,' because 'Server Side Copy' already has a definition in rclone, which can confuse users. Additionally, besides copy file, rclone can also move file, so it’s better to use the term 'transferred' uniformly. Moreover, to maintain interface consistency and help users better understand the progress, I suggest directly using percentages to display it.

    Original Interface:

    Transferred:   	  219.472 GiB / 9.064 TiB, 2%, 74.277 MiB/s, ETA 1d10h42m
    Checks:               362 / 362, 100%
    Transferred:           53 / 3934, 1%
    Server Side Copies:    31 @ 157.756 GiB
    Elapsed time:      27m7.4s
    Transferring:

    Suggested Interface:

    Transferred:   	  219.472 GiB / 9.064 TiB, 2%, 74.277 MiB/s, ETA 1d10h42m
    Checks:               362 / 362, 100%
    Transferred:           53 / 3934, 1%
    Flash transferred:     31 / 53, 58%
    Elapsed time:      27m7.4s
    Transferring:

    Of course, it can be displayed in full detail, but I think that's a bit too complicated. So, I still suggest displaying just the file count.

    Transferred:   	  219.472 GiB / 9.064 TiB, 2%, 74.277 MiB/s, ETA 1d10h42m
    Checks:               362 / 362, 100%
    Transferred:           53 / 3934, 1%
    Flash transferred:     31 / 53, 58%, 157.756 GiB / 219.472 GiB, 72%
    Elapsed time:      27m7.4s
    Transferring:

    Additionally, I found that the current server-to-server transfer mode still occupies the entire file space when the file transfer begins. When transferring eight large files simultaneously(--transfers=8), it still shows insufficient disk space, causing some files to fail to transfer. However, once the transfer starts, the space usage returns to normal.

    Thank you again for your selfless dedication.

  20. cj-neo commented on Jul 22, 2024

    @cj-neo
    Author

    So far, I have tested transferring over 2.5TB of data. Besides the previously mentioned space usage issue, I haven't found any other significant errors. However, the space usage issue still needs to be resolved if possible, because I later adjusted to sync only four files at a time, but still encountered several errors due to insufficient disk space.

    PS.I use the Google Colab service to transfer files. Before starting Rclone, the remaining disk space is approximately 70GB.

  21. wiserain commented on Jul 22, 2024

    @wiserain
    Contributor

    Pikpak's upload by hash is currently not fully supported by rclone's accountings. If many backends support similar operations, maybe we should consider categorizing this type of new transfer specifically for better clarity and future development. Until then, we can treat it as a server-side copy due to its zero-traffic nature.

    Regarding the space usage, I will take a look.

  22. cj-neo commented on Jul 22, 2024

    @cj-neo
    Author

    Pikpak's upload by hash is currently not fully supported by rclone's accountings. If many backends support similar operations, maybe we should consider categorizing this type of new transfer specifically for better clarity and future development. Until then, we can treat it as a server-side copy due to its zero-traffic nature.

    Regarding the space usage, I will take a look.

    Got it, I understand. I'm just making some suggestions, but of course, the final decision is up to you. Previously, Baidu Netdisk also had a similar feature called flash transfer. That's why I suggested changing the name. However, the name itself isn't very important.

    Additionally, I have some thoughts regarding space usage. If the space usage issue cannot be resolved, could we, regardless of the --transfers parameter, force it to parse the hash of only one file at a time to maximize space usage? Alternatively, it could check the current available disk space before parsing the hash. If there isn't enough space, it would skip getting the hash and force the upload (though this would lose the opportunity to skip the upload, it's better than encountering errors).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions