diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index 8dddc2db84..8b0b775196 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -337,6 +337,26 @@ Function SetCassandraEnvironment # Add sigar env - see Cassandra-7838 $env:JVM_OPTS = "$env:JVM_OPTS -Djava.library.path=$env:CASSANDRA_HOME\lib\sigar-bin" + # Confirm we're on high performance power plan, warn if not + # Change to $true to suppress this warning + $suppressPowerWarning = $false + if (!$suppressPowerWarning) + { + $currentProfile = powercfg /GETACTIVESCHEME + if (!$currentProfile.Contains("High performance")) + { + echo "*---------------------------------------------------------------------*" + echo "*---------------------------------------------------------------------*" + echo "" + echo " WARNING! Detected a power profile other than High Performance." + echo " Performance of this node will suffer." + echo " Modify conf\cassandra.env.ps1 to suppress this warning." + echo "" + echo "*---------------------------------------------------------------------*" + echo "*---------------------------------------------------------------------*" + } + } + # add the jamm javaagent if (($env:JVM_VENDOR -ne "OpenJDK") -or ($env:JVM_VERSION.CompareTo("1.6.0") -eq 1) -or (($env:JVM_VERSION -eq "1.6.0") -and ($env:JVM_PATCH_VERSION.CompareTo("22") -eq 1)))