In case you're recording with Nvenc, you're recording with hevc or av1, since it's not possible to record 4k resolution with nvenc h.264. Nvenc has its own performance limit, since it's a dedicated circuit and somewhat independent from the 3D computing performance of the GPU.
According to
https://docs.nvidia.com/video-techn...application-note/index.html#nvenc-performance Nvenc on the ADA chip is able to encode a full hd (1920x1080) video with p7 preset + "High Quality" tuning with 178 fps. In "Low Latency" mode, it achieves 282 fps.
You're recording 4k, that means 4 times the pixels, i. e. quarter the performance. That means, nvenc has 178/4 = 44.5 fps with the HQ tuning and 70.5 fps.
So if you actually set P7+HQ, Nvenc limits to 44.5 fps. P7+LL limits to 70.5 fps.
You wrote you record, not stream. It might come as a surprise, but if you're recording with CQP mode, the pX and quality tuning is irrelevant. These settings make the recording file smaller. For streaming, thus using CBR or VBR, this means less data to transmit, so it appears as you have more bitrate, so you achieve better quality. But for recording in CQP mode, just the recorded file gets slightly larger. But the visual quality is the same. You will notice no visual difference between a P1+LL recording and a P7+HQ recording. Only the file size will be different.
So use a pX setting that yields a high enough fps according to the above data sheet. The fps values are normalized to 1920x1080, so if you use a different resolution, scale by the amount of pixels.