{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/2508","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/2508/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/2508/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/2508/events","html_url":"https://github.com/hazelcast/hazelcast/issues/2508","id":33945929,"number":2508,"title":"High memory usage after adding an index","user":{"login":"msew","id":7599480,"avatar_url":"https://avatars.githubusercontent.com/u/7599480?v=3","gravatar_id":"","url":"https://api.github.com/users/msew","html_url":"https://github.com/msew","followers_url":"https://api.github.com/users/msew/followers","following_url":"https://api.github.com/users/msew/following{/other_user}","gists_url":"https://api.github.com/users/msew/gists{/gist_id}","starred_url":"https://api.github.com/users/msew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msew/subscriptions","organizations_url":"https://api.github.com/users/msew/orgs","repos_url":"https://api.github.com/users/msew/repos","events_url":"https://api.github.com/users/msew/events{/privacy}","received_events_url":"https://api.github.com/users/msew/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20QuSP","name":"Team: QuSP","color":"009800"},{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Type:%20Defect","name":"Type: Defect","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"ajermakovics","id":999984,"avatar_url":"https://avatars.githubusercontent.com/u/999984?v=3","gravatar_id":"","url":"https://api.github.com/users/ajermakovics","html_url":"https://github.com/ajermakovics","followers_url":"https://api.github.com/users/ajermakovics/followers","following_url":"https://api.github.com/users/ajermakovics/following{/other_user}","gists_url":"https://api.github.com/users/ajermakovics/gists{/gist_id}","starred_url":"https://api.github.com/users/ajermakovics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajermakovics/subscriptions","organizations_url":"https://api.github.com/users/ajermakovics/orgs","repos_url":"https://api.github.com/users/ajermakovics/repos","events_url":"https://api.github.com/users/ajermakovics/events{/privacy}","received_events_url":"https://api.github.com/users/ajermakovics/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61","html_url":"https://github.com/hazelcast/hazelcast/milestones/3.6","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/61/labels","id":982584,"number":61,"title":"3.6","description":"","creator":{"login":"enesakar","id":234086,"avatar_url":"https://avatars.githubusercontent.com/u/234086?v=3","gravatar_id":"","url":"https://api.github.com/users/enesakar","html_url":"https://github.com/enesakar","followers_url":"https://api.github.com/users/enesakar/followers","following_url":"https://api.github.com/users/enesakar/following{/other_user}","gists_url":"https://api.github.com/users/enesakar/gists{/gist_id}","starred_url":"https://api.github.com/users/enesakar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enesakar/subscriptions","organizations_url":"https://api.github.com/users/enesakar/orgs","repos_url":"https://api.github.com/users/enesakar/repos","events_url":"https://api.github.com/users/enesakar/events{/privacy}","received_events_url":"https://api.github.com/users/enesakar/received_events","type":"User","site_admin":false},"open_issues":138,"closed_issues":689,"state":"open","created_at":"2015-02-17T09:27:09Z","updated_at":"2015-10-27T11:37:46Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2014-05-21T02:03:32Z","updated_at":"2015-10-27T11:39:04Z","closed_at":"2015-10-27T11:37:46Z","body":"Adding an index to an IMap uses much more memory than I would have expected.\r\n\r\nFor example, with a simple test object:\r\n```\r\npublic class ModelObject implements Portable {\r\n    private String id;\r\n    private long timestamp;\r\n    ...\r\n}\r\n```\r\n\r\n**With 1 node:**\r\nHeap dump size after inserting 1,000,000 objects = ~450MB\r\nHeap dump size after adding sorted index to \"timestamp\" = ~1850MB\r\n\r\n**With 4 nodes:**\r\nHeap dump size (per node) after inserting 1,000,000 objects = ~230MB\r\nHeap dump size (per node) adding sorted index to \"timestamp\" = ~610MB\r\n\r\nThese numbers are from Hazelcast 3.2.1\r\n"},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/151463956","html_url":"https://github.com/hazelcast/hazelcast/issues/2508#issuecomment-151463956","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/2508","id":151463956,"user":{"login":"pveentjer","id":105243,"avatar_url":"https://avatars.githubusercontent.com/u/105243?v=3","gravatar_id":"","url":"https://api.github.com/users/pveentjer","html_url":"https://github.com/pveentjer","followers_url":"https://api.github.com/users/pveentjer/followers","following_url":"https://api.github.com/users/pveentjer/following{/other_user}","gists_url":"https://api.github.com/users/pveentjer/gists{/gist_id}","starred_url":"https://api.github.com/users/pveentjer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pveentjer/subscriptions","organizations_url":"https://api.github.com/users/pveentjer/orgs","repos_url":"https://api.github.com/users/pveentjer/repos","events_url":"https://api.github.com/users/pveentjer/events{/privacy}","received_events_url":"https://api.github.com/users/pveentjer/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T11:39:04Z","updated_at":"2015-10-27T11:39:04Z","body":"In 3.7 more work will be done to optimize. Probably we'll reintroduce the CACHED in memory format so that object and binary can live next to each other to speed up queries and regular access, at the cost of increased memory usage."}}