1. A method for optimizing performance of systems, comprising: performing operations by a device to automatically detect and track changes in an operating state thereof; automatically determining, by at least one electronic circuit of said device at any given time, if said operating state is currently a standalone operating state or a cluster operating state based on a value of a flag stored in said device or contents of device registration information stored in a master device of a cluster of devices, where said standalone operating state occurs when said device is deployed as a standalone device and said cluster operating state occurs when said device is deployed as a cluster device; automatically delegating, by said electronic circuit, data management operations for handling incoming requests to a centralized Memory Management System (MMS) of said device if a determination is made that said operating state is currently a standalone operating state; and automatically delegating, by said electronic circuit, said data management operations for handling incoming requests to a distributed MMS of said device if a determination is made that said operating state is currently a cluster operating state; wherein said incoming requests comprise at least one of a request for reading data from a memory, writing data into said memory, updating data stored in said memory, and deleting data stored in said memory.