{"action":"created","issue":{"url":"https://api.github.com/repos/yast/yast-installation/issues/407","repository_url":"https://api.github.com/repos/yast/yast-installation","labels_url":"https://api.github.com/repos/yast/yast-installation/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/yast/yast-installation/issues/407/comments","events_url":"https://api.github.com/repos/yast/yast-installation/issues/407/events","html_url":"https://github.com/yast/yast-installation/pull/407","id":166107371,"number":407,"title":"Instsys cleanup","user":{"login":"lslezak","id":907998,"avatar_url":"https://avatars.githubusercontent.com/u/907998?v=3","gravatar_id":"","url":"https://api.github.com/users/lslezak","html_url":"https://github.com/lslezak","followers_url":"https://api.github.com/users/lslezak/followers","following_url":"https://api.github.com/users/lslezak/following{/other_user}","gists_url":"https://api.github.com/users/lslezak/gists{/gist_id}","starred_url":"https://api.github.com/users/lslezak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lslezak/subscriptions","organizations_url":"https://api.github.com/users/lslezak/orgs","repos_url":"https://api.github.com/users/lslezak/repos","events_url":"https://api.github.com/users/lslezak/events{/privacy}","received_events_url":"https://api.github.com/users/lslezak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-18T14:30:13Z","updated_at":"2016-07-20T08:35:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yast/yast-installation/pulls/407","html_url":"https://github.com/yast/yast-installation/pull/407","diff_url":"https://github.com/yast/yast-installation/pull/407.diff","patch_url":"https://github.com/yast/yast-installation/pull/407.patch"},"body":"This PR adds a new installation code which removes files from the inst-sys when the system has low memory. If the system has enough memory (at least 1GB) the inst-sys is kept untouched. \r\n\r\nThe inst-sys cleanup functionality will be called after partitioning and before installing the packages.\r\nThe partitioner might load some kernel modules during disk formatting and mounting the target system (e.g. the filesystem modules), we cannot move the cleanup earlier.\r\n\r\n*Note: We would need to split the cleanup it into two parts which would make it more complicated, let's use this simplified version for now. If it is still not sufficient we can improve it later.*\r\n\r\n## Removed Parts\r\n\r\n- Deletes the `raw` libzypp cache (about 2.5MB when installing pure SLES without any addons and without the Updates from the registration server)\r\n- Delets the kernel modules, all needed modules should be already loaded (29MB on x86_64, 5MB on s390)\r\n\r\n## Test\r\n\r\nI have tested this change in a patched (DUD) Beta4 installation in an x86_64 VirtualBox VM with 512MB RAM.\r\n\r\n*Note: To work properly this update also needs a patch in the `control.xml` to call the new client. I'll adapt the control packages later in separate pull requests.*\r\n\r\n### Result\r\n\r\nThe memory statistics logged by the test installation:\r\n\r\n#### Before Freeing the Memory\r\n\r\n```\r\n             total       used       free     shared    buffers     cached\r\nMem:           487        478          8        154          7        256\r\n-/+ buffers/cache:        214        272\r\nSwap:         1245          0       1245\r\n```\r\n\r\n```\r\nFilesystem                                   1M-blocks  Used Available Use% Mounted on\r\ntmpfs                                              488    98       391  20% /\r\n```\r\n\r\n#### After Freeing the Memory\r\n\r\n```\r\n             total       used       free     shared    buffers     cached\r\nMem:           487        447         40        123          7        224\r\n-/+ buffers/cache:        214        272\r\nSwap:         1245          0       1245\r\n```\r\n\r\n```\r\nFilesystem                                   1M-blocks  Used Available Use% Mounted on\r\ntmpfs                                              488    67       422  14% /\r\n```\r\n\r\n#### The Difference\r\n\r\nAs you can see the system has about **32MB more memory available for the installer**. That's quite a lot on a system with 512MB RAM...\r\n\r\n*Note: The result highly depends on the system and the architecture. On S390 the freed memory is much smaller because the kernel modules take just about 5MB (on x86_64 it is about 29MB).*"},"comment":{"url":"https://api.github.com/repos/yast/yast-installation/issues/comments/233885994","html_url":"https://github.com/yast/yast-installation/pull/407#issuecomment-233885994","issue_url":"https://api.github.com/repos/yast/yast-installation/issues/407","id":233885994,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T08:35:48Z","updated_at":"2016-07-20T08:35:48Z","body":"\n[![Coverage Status](https://coveralls.io/builds/7082217/badge)](https://coveralls.io/builds/7082217)\n\nCoverage increased (+0.6%) to 29.132% when pulling **14479dc79cd53d90fa69b16c2dd400eeb9f3866b on instsys_cleanup** into **85d379db49a9c5a0e2573edfc925be87ea2ec901 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}