diff --git a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
index <HASH>..<HASH> 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
@@ -42,7 +42,7 @@ import static org.apache.flink.util.Preconditions.checkNotNull;
  *
  */
 @PublicEvolving
-public class MemorySize implements java.io.Serializable {
+public class MemorySize implements java.io.Serializable, Comparable<MemorySize> {
 
 	private static final long serialVersionUID = 1L;
 
@@ -120,6 +120,11 @@ public class MemorySize implements java.io.Serializable {
 		return bytes + " bytes";
 	}
 
+	@Override
+	public int compareTo(MemorySize that) {
+		return Long.compare(this.bytes, that.bytes);
+	}
+
 	// ------------------------------------------------------------------------
 	//  Calculations
 	// ------------------------------------------------------------------------
[hotfix] Make MemorySize comparable.