CS-FreeStyle / 10000-How-To-Do-in-CS

1 stars 0 forks source link

gpu clock nvidia-smi #140

Open liuty10 opened 3 years ago

liuty10 commented 3 years ago

https://stackoverflow.com/questions/64701751/can-i-fix-my-gpu-clock-rate-to-ensure-consistent-profiling-results

NVIDIA X server Settings is an GUI application, which may also help.

CPU clock setting:

#if defined(FPS_THROTTLING)
                             if(cpu_scaling_down_flag == 1){
                                 FILE *fp1 = NULL;
                                 FILE *fp2 = NULL;
                                 FILE *fp3 = NULL;
                                 fp1 = fopen("/sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq", "w+");
                                 fp2 = fopen("/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq", "w+");
                                 fp3 = fopen("/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", "w+");
                                 if(fp1 != NULL && fp2 != NULL && fp3 != NULL){
                                        fputs("4300000", fp1);
                                        fputs("4300000", fp2);
                                        fputs("4300000", fp3);
                                        fclose(fp1);
                                        fclose(fp2);
                                        fclose(fp3);
                                        cpu_scaling_down_flag = 0;
                                 }
                             }
 #endif