diff --git a/config/bmcweb_config.h.in b/config/bmcweb_config.h.in
index ae98675..1290bd6 100644
--- a/config/bmcweb_config.h.in
+++ b/config/bmcweb_config.h.in
@@ -16,4 +16,7 @@
 constexpr const bool bmcwebInsecureEnableHttpPushStyleEventing = @BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING@ == 1;
 
 constexpr const char* bmcwebLoggingLevel = "@BMCWEB_LOGGING_LEVEL@";
+
+constexpr const bool bmcwebEnableHealthPopulate = @BMCWEB_ENABLE_HEALTH_POPULATE@ == 1;
+
 // clang-format on
diff --git a/config/meson.build b/config/meson.build
index b13a023..bd8aada 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -12,6 +12,9 @@
 conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
 conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
 conf_data.set('HTTPS_PORT', get_option('https_port'))
+conf_data.set('HTTPS_PORT', get_option('https_port'))
+enable_health_populate = get_option('health-populate')
+conf_data.set10('BMCWEB_ENABLE_HEALTH_POPULATE', enable_health_populate.enabled())
 
 # Logging level
 loglvlopt = get_option('bmcweb-logging')
diff --git a/meson_options.txt b/meson_options.txt
index 3c2d3f7..3f37f9e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -325,3 +325,11 @@
                     enable on production systems at this time.  Other query
                     parameters such as only are not controlled by this option.'''
 )
+
+option(
+    'health-populate',
+    type: 'feature',
+    value: 'enabled',
+    description: '''Enables HealthPopulate and generate the Status property for
+                    the resource'''
+)
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index a274421..32eb29b 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_utility.hpp"
 #include "health.hpp"
@@ -252,18 +254,21 @@
 
             auto health = std::make_shared<HealthPopulate>(asyncResp);
 
-            dbus::utility::getAssociationEndPoints(
-                path + "/all_sensors",
-                [health](const boost::system::error_code& ec2,
-                         const dbus::utility::MapperEndPoints& resp) {
-                if (ec2)
-                {
-                    return; // no sensors = no failures
-                }
-                health->inventory = resp;
-                });
+            if constexpr (bmcwebEnableHealthPopulate)
+            {
+                dbus::utility::getAssociationEndPoints(
+                    path + "/all_sensors",
+                    [health](const boost::system::error_code& ec2,
+                             const dbus::utility::MapperEndPoints& resp) {
+                    if (ec2)
+                    {
+                        return; // no sensors = no failures
+                    }
+                    health->inventory = resp;
+                    });
 
-            health->populate();
+                health->populate();
+            }
 
             if (connectionNames.empty())
             {
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 330e68e..5330be1 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_singleton.hpp"
 #include "dbus_utility.hpp"
@@ -1559,30 +1561,31 @@
                        const std::vector<IPv4AddressData>& ipv4Data,
                        const std::vector<IPv6AddressData>& ipv6Data)
 {
-    constexpr std::array<std::string_view, 1> inventoryForEthernet = {
-        "xyz.openbmc_project.Inventory.Item.Ethernet"};
-
     nlohmann::json& jsonResponse = asyncResp->res.jsonValue;
     jsonResponse["Id"] = ifaceId;
     jsonResponse["@odata.id"] = boost::urls::format(
         "/redfish/v1/Managers/bmc/EthernetInterfaces/{}", ifaceId);
     jsonResponse["InterfaceEnabled"] = ethData.nicEnabled;
 
-    auto health = std::make_shared<HealthPopulate>(asyncResp);
+    if constexpr (bmcwebEnableHealthPopulate)
+    {
+        constexpr std::array<std::string_view, 1> inventoryForEthernet = {
+            "xyz.openbmc_project.Inventory.Item.Ethernet"};
+        auto health = std::make_shared<HealthPopulate>(asyncResp);
+        dbus::utility::getSubTreePaths(
+            "/", 0, inventoryForEthernet,
+            [health](const boost::system::error_code& ec,
+                     const dbus::utility::MapperGetSubTreePathsResponse& resp) {
+            if (ec)
+            {
+                return;
+            }
 
-    dbus::utility::getSubTreePaths(
-        "/", 0, inventoryForEthernet,
-        [health](const boost::system::error_code& ec,
-                 const dbus::utility::MapperGetSubTreePathsResponse& resp) {
-        if (ec)
-        {
-            return;
-        }
+            health->inventory = resp;
+            });
 
-        health->inventory = resp;
-        });
-
-    health->populate();
+        health->populate();
+    }
 
     if (ethData.nicEnabled)
     {
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index b08ee51..827cfdb 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_utility.hpp"
 #include "health.hpp"
@@ -2015,9 +2017,12 @@
         asyncResp->res.jsonValue["Links"]["ManagerForServers"] =
             std::move(managerForServers);
 
-        auto health = std::make_shared<HealthPopulate>(asyncResp);
-        health->isManagersHealth = true;
-        health->populate();
+        if constexpr (bmcwebEnableHealthPopulate)
+        {
+            auto health = std::make_shared<HealthPopulate>(asyncResp);
+            health->isManagersHealth = true;
+            health->populate();
+        }
 
         sw_util::populateSoftwareInformation(asyncResp, sw_util::bmcPurpose,
                                              "FirmwareVersion", true);
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 46b35d5..1f554cc 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_utility.hpp"
 #include "health.hpp"
@@ -601,9 +603,12 @@
                                  const std::string& service,
                                  const std::string& objPath)
 {
-    auto health = std::make_shared<HealthPopulate>(aResp);
-    health->selfPath = objPath;
-    health->populate();
+    if constexpr (bmcwebEnableHealthPopulate)
+    {
+        auto health = std::make_shared<HealthPopulate>(aResp);
+        health->selfPath = objPath;
+        health->populate();
+    }
 
     BMCWEB_LOG_DEBUG << "Get available system components.";
     sdbusplus::asio::getAllProperties(
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index a77bb91..5ec6b5c 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_utility.hpp"
 #include "generated/enums/drive.hpp"
@@ -92,8 +94,11 @@
         auto& count = asyncResp->res.jsonValue["Drives@odata.count"];
         count = 0;
 
-        health->inventory.insert(health->inventory.end(), driveList.begin(),
-                                 driveList.end());
+        if constexpr (bmcwebEnableHealthPopulate)
+        {
+            health->inventory.insert(health->inventory.end(), driveList.begin(),
+                                     driveList.end());
+        }
 
         for (const std::string& drive : driveList)
         {
@@ -240,21 +245,24 @@
                 });
         }
 
-        // this is done after we know the json array will no longer
-        // be resized, as json::array uses vector underneath and we
-        // need references to its members that won't change
-        size_t count = 0;
-        // Pointer based on |asyncResp->res.jsonValue|
-        nlohmann::json::json_pointer rootPtr =
-            "/StorageControllers"_json_pointer;
-        for (const auto& [path, interfaceDict] : subtree)
+        if constexpr (bmcwebEnableHealthPopulate)
         {
-            auto subHealth = std::make_shared<HealthPopulate>(
-                asyncResp, rootPtr / count / "Status");
-            subHealth->inventory.emplace_back(path);
-            health->inventory.emplace_back(path);
-            health->children.emplace_back(subHealth);
-            count++;
+            // this is done after we know the json array will no longer
+            // be resized, as json::array uses vector underneath and we
+            // need references to its members that won't change
+            size_t count = 0;
+            // Pointer based on |asyncResp->res.jsonValue|
+            nlohmann::json::json_pointer rootPtr =
+                "/StorageControllers"_json_pointer;
+            for (const auto& [path, interfaceDict] : subtree)
+            {
+                auto subHealth = std::make_shared<HealthPopulate>(
+                    asyncResp, rootPtr / count / "Status");
+                subHealth->inventory.emplace_back(path);
+                health->inventory.emplace_back(path);
+                health->children.emplace_back(subHealth);
+                count++;
+            }
         }
         });
 }
@@ -278,7 +286,10 @@
         asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
 
         auto health = std::make_shared<HealthPopulate>(asyncResp);
-        health->populate();
+        if constexpr (bmcwebEnableHealthPopulate)
+        {
+            health->populate();
+        }
 
         getDrives(asyncResp, health);
         getStorageControllers(asyncResp, health);
@@ -703,9 +714,12 @@
             // default it to Enabled
             asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
 
-            auto health = std::make_shared<HealthPopulate>(asyncResp);
-            health->inventory.emplace_back(path);
-            health->populate();
+            if constexpr (bmcwebEnableHealthPopulate)
+            {
+                auto health = std::make_shared<HealthPopulate>(asyncResp);
+                health->inventory.emplace_back(path);
+                health->populate();
+            }
 
             addAllDriveInfo(asyncResp, connectionNames[0].first, path,
                             connectionNames[0].second);
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 4a60748..8d978f1 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -15,6 +15,8 @@
 */
 #pragma once
 
+#include "bmcweb_config.h"
+
 #include "app.hpp"
 #include "dbus_singleton.hpp"
 #include "dbus_utility.hpp"
@@ -380,8 +382,11 @@
             auto cpuHealth = std::make_shared<HealthPopulate>(
                 aResp, "/ProcessorSummary/Status"_json_pointer);
 
-            systemHealth->children.emplace_back(memoryHealth);
-            systemHealth->children.emplace_back(cpuHealth);
+            if constexpr (bmcwebEnableHealthPopulate)
+            {
+                systemHealth->children.emplace_back(memoryHealth);
+                systemHealth->children.emplace_back(cpuHealth);
+            }
 
             // This is not system, so check if it's cpu, dimm, UUID or
             // BiosVer
@@ -3107,27 +3112,30 @@
             nlohmann::json::array_t({"KVMIP"});
 
 #endif // BMCWEB_ENABLE_KVM
-        constexpr std::array<std::string_view, 4> inventoryForSystems{
-            "xyz.openbmc_project.Inventory.Item.Dimm",
-            "xyz.openbmc_project.Inventory.Item.Cpu",
-            "xyz.openbmc_project.Inventory.Item.Drive",
-            "xyz.openbmc_project.Inventory.Item.StorageController"};
 
         auto health = std::make_shared<HealthPopulate>(asyncResp);
-        dbus::utility::getSubTreePaths(
-            "/", 0, inventoryForSystems,
-            [health](const boost::system::error_code& ec,
-                     const std::vector<std::string>& resp) {
-            if (ec)
-            {
-                // no inventory
-                return;
-            }
+        if constexpr (bmcwebEnableHealthPopulate)
+        {
+            constexpr std::array<std::string_view, 4> inventoryForSystems{
+                "xyz.openbmc_project.Inventory.Item.Dimm",
+                "xyz.openbmc_project.Inventory.Item.Cpu",
+                "xyz.openbmc_project.Inventory.Item.Drive",
+                "xyz.openbmc_project.Inventory.Item.StorageController"};
 
-            health->inventory = resp;
-            });
+            dbus::utility::getSubTreePaths(
+                "/", 0, inventoryForSystems,
+                [health](const boost::system::error_code& ec,
+                         const std::vector<std::string>& resp) {
+                if (ec)
+                {
+                    // no inventory
+                    return;
+                }
 
-        health->populate();
+                health->inventory = resp;
+                });
+            health->populate();
+        }
 
         getMainChassisId(asyncResp,
                          [](const std::string& chassisId,
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 78817ff..050b75c 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -14,6 +14,7 @@
 // limitations under the License.
 */
 #pragma once
+#include "bmcweb_config.h"
 
 #include "app.hpp"
 #include "dbus_utility.hpp"
@@ -490,8 +491,11 @@
 
         asyncResp->res.jsonValue["LifeCycleEventOnTaskStateChange"] = true;
 
-        auto health = std::make_shared<HealthPopulate>(asyncResp);
-        health->populate();
+        if constexpr (bmcwebEnableHealthPopulate)
+        {
+            auto health = std::make_shared<HealthPopulate>(asyncResp);
+            health->populate();
+        }
         asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
         asyncResp->res.jsonValue["ServiceEnabled"] = true;
         asyncResp->res.jsonValue["Tasks"]["@odata.id"] =
