Memory Backend Questions

Okay, first of all--I love it. Thanks @ncw. You make the world a better place.

Three semi-related things:

  1. Is there a way to cap its size? doesn't give much detail

  2. How does this handle using more than the physical amount of RAM in a system? Will it move the contents of your ramdisk to swap?

  3. I'm seeing lower copy performance from my SSD to the memory backend than I am seeing SSD to SSD. Is this expected performance or does it warrant troubleshooting on my end?

Not currently!

It will do what your OS is configured to do which is likely swap memory to disk.

Interesting and not what I would expect! How are you measuring it?

I didn't try to optimize the memory backend yet!

Drag and drop copy from SSD to ramdisk.
Then duplicate the same file on the SSD.

I’m using APFS, and I’m actually not too familiar with its inner workings. It’s possible that the fact that I’m duplicating a file is the reason for this; I’ll look in to it further now that you’ve said this is not the performance you’d expect.

What interface does the SSD have?

If it is a modern SSD that has a S-ATA interface (like a lot of cheaper high-capacity ones have) then the SSD may have a lot higher internal bandwidth than it does out to the rest of the system.
If this is the case it could explain why internal copying on the same disk is faster than to memory (ie. the S-ATA link would be the choke as it can only do up to about 500MB/sec max).

Note that not all SSDs that use M.2 slots necessarily use the much much faster NVME interface. M.2 is just a physical slot format. S-ATA and NVME are the interface protocols. They are not necessarily related.

But of course the problem could be a completely different one ... :slight_smile:

I did a quick test myself...

I ran rclone mount :memory: /mnt/tmp and timed copying a 1GB file to there, this gave speeds of about 240 MB/s

I then ran rclone mount /mnt/mount /mnt/tmp and timed copying the same file there - this gave speeds of about 170 MB/s.

I used dd if=1GB of=/mnt/tmp/1GB bs=2M to do the copying.

If I use rm /mnt/tmp/1GB ; rclone copyto --ignore-checksum -P 1GB /mnt/tmp/1GB to do the copying then they are both pretty similar at about 230 MB/s.

So I think what we are measuring here is the max speed of the fuse interface probably rather than anything else.

I note that the memory backend uses memory like it is going out of fashion - that probably needs fixing! It should use mmap for storing the files I think.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.