{
  "Attributes": [
    {
      "Name": "MemLimit",
      "Controller": "memory",
      "File": "memory.limit_in_bytes"
    },
    {
      "Name": "MemSoftLimit",
      "Controller": "memory",
      "File": "memory.soft_limit_in_bytes"
    },
    {
      "Name": "MemSwappiness",
      "Controller": "memory",
      "File": "memory.swappiness"
    },
    {
      "Name": "FreezerState",
      "Controller": "freezer",
      "File": "cgroup.freeze"
    }
  ],

  "Profiles": [
    {
      "Name": "Frozen",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "1"
          }
        }
      ]
    },
    {
      "Name": "Unfrozen",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "0"
          }
        }
      ]
    },


    {
      "Name": "LowIoPriority",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "blkio",
            "Path": "background"
          }
        }
      ]
    },
    {
      "Name": "NormalIoPriority",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "blkio",
            "Path": ""
          }
        }
      ]
    },
    {
      "Name": "HighIoPriority",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "blkio",
            "Path": ""
          }
        }
      ]
    },
    {
      "Name": "MaxIoPriority",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "blkio",
            "Path": ""
          }
        }
      ]
    },

    {
      "Name": "TimerSlackHigh",
      "Actions": [
        {
          "Name": "SetTimerSlack",
          "Params":
          {
            "Slack": "50000"
          }
        }
      ]
    },
    {
      "Name": "TimerSlackNormal",
      "Actions": [
        {
          "Name": "SetTimerSlack",
          "Params":
          {
            "Slack": "50000"
          }
        }
      ]
    },

    {
      "Name": "PerfBoost",
      "Actions": [
        {
          "Name": "SetClamps",
          "Params":
          {
            "Boost": "50%",
            "Clamp": "0"
          }
        }
      ]
    },
    {
      "Name": "PerfClamp",
      "Actions": [
        {
          "Name": "SetClamps",
          "Params":
          {
            "Boost": "0",
            "Clamp": "30%"
          }
        }
      ]
    },

    {
      "Name": "LowMemoryUsage",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "MemSoftLimit",
            "Value": "16MB"
          }
        },
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "MemSwappiness",
            "Value": "150"

          }
        }
      ]
    },
    {
      "Name": "HighMemoryUsage",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "MemSoftLimit",
            "Value": "512MB"
          }
        },
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "MemSwappiness",
            "Value": "100"
          }
        }
      ]
    },
    {
      "Name": "SystemMemoryProcess",
      "Actions": [
        {
          "Name": "JoinCgroup",
          "Params":
          {
            "Controller": "memory",
            "Path": "system"
          }
        }
      ]
    },
    {
      "Name": "FreezerThawed",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "THAWED"
          }
        }
      ]
    },
    {
      "Name": "FreezerFrozen",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "FROZEN"
          }
        }
      ]
    }
  ],

  "AggregateProfiles": [
    {
      "Name": "SCHED_SP_DEFAULT",
      "Profiles": [ "TimerSlackNormal" ]
    },
    {
      "Name": "SCHED_SP_BACKGROUND",
      "Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
    },
    {
      "Name": "SCHED_SP_FOREGROUND",
      "Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
    },
    {
      "Name": "SCHED_SP_TOP_APP",
      "Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
    },
    {
      "Name": "SCHED_SP_RT_APP",
      "Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
    },
    {
      "Name": "CPUSET_SP_DEFAULT",
      "Profiles": [ "TimerSlackNormal" ]
    },
    {
      "Name": "CPUSET_SP_BACKGROUND",
      "Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
    },
    {
      "Name": "CPUSET_SP_FOREGROUND",
      "Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
    },
    {
      "Name": "CPUSET_SP_TOP_APP",
      "Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
    },
    {
      "Name": "CPUSET_SP_SYSTEM",
      "Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
    },
    {
      "Name": "CPUSET_SP_RESTRICTED",
      "Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
    }
  ]
}
