Merge pull request #41217 from ClickHouse/kvm-clock

Do not warn about kvm-clock
This commit is contained in:
Sergei Trifonov 2022-09-13 15:35:10 +02:00 committed by GitHub
commit b57332f9ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,8 +551,9 @@ static void sanityChecks(Server & server)
try
{
const char * filename = "/sys/devices/system/clocksource/clocksource0/current_clocksource";
if (readString(filename).find("tsc") == std::string::npos)
server.context()->addWarningMessage("Linux is not using a fast TSC clock source. Performance can be degraded. Check " + String(filename));
String clocksource = readString(filename);
if (clocksource.find("tsc") == std::string::npos && clocksource.find("kvm-clock") == std::string::npos)
server.context()->addWarningMessage("Linux is not using a fast clock source. Performance can be degraded. Check " + String(filename));
}
catch (...)
{