"The buffer method is set to disk storage, and the disk storage is SSD and more than half free."
Better set it to system memory (aka RAM, IF you have enough free RAM ofc), as constant flow of writing to disk storage just murders disks during long usage. But you do you...
"The recording time is 12000 seconds, which consumes up to 7000MB or more memory.
Can you tell me if there is a way to reduce memory consumption"
1200 seconds i suppose, as it is max value... Why would you ever need such HUGE replays... it is 20 minutes of time. Moreover, there is even number that literally shows you size of buffer that will be constantly taken with rewriting data inside to have constantly these last 20 minutes of gameplay fresh.
Anyways. You have 3 ways to fix that.
1. Reduce replay duration to something more reasonable, like 120-180 seconds. It will reduce buffer size to 750-1125 MB from 7500
2. Reduce bitrate. 1200 seconds = 7500 MB with 50 Mb/s bitrate. With 25 Mb/s it will be only 3750 MB... But you will pay with recording quality of course.
3. Disable Replay completely. No consumption and less compatability problem with some games/programs (i have one that crashes consistently when i have Replay turned on). Use hotkeys to turn recording on and off as alternative. Replay isn't meant to make long recordings anyways.