Hi,
I agree with Igor in that the problem is probably with the SSD.. That is why things are being buffered in RAM..
What you describe is a common problem with a lot of the "TLC" type SSDs.. They typically use a buffer of maybe 8GB, or maybe less, of really fast memory as a buffer.. The actual write speed to the actual storage area can be much slower.. Especially if overwriting an area on the drive which requires first resetting the area being overwritten to zeros before new data can be written..
I have personally had similar issues as you describe with two of the TLC type SSDs, although mine were 128GB which aggravates the matter even more as they only have 1\4 to1\2 the number of internal data channels of a 512GB drive..
I would copy 20GB images to these drives and they would start off normally.. 500MB/s or so, but after approximately 4GB had been copied the speed dropped to slower than my USB 2.0 flash drives..
This does not take into account that your SSD may have some internal issues.. You may have better luck with a Crucial or Samsung drive for instance, but I couldn't say.. You would probably get better results with a 1TB drive as it would probably have a larger buffer and more data channels..