{"action":"created","issue":{"url":"https://api.github.com/repos/ceph/ceph/issues/4864","labels_url":"https://api.github.com/repos/ceph/ceph/issues/4864/labels{/name}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/4864/comments","events_url":"https://api.github.com/repos/ceph/ceph/issues/4864/events","html_url":"https://github.com/ceph/ceph/pull/4864","id":85146431,"number":4864,"title":"FileJournal: Remove CEPH_PAGE_SIZE assumptions","user":{"login":"stevecapperlinaro","id":9270564,"avatar_url":"https://avatars.githubusercontent.com/u/9270564?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecapperlinaro","html_url":"https://github.com/stevecapperlinaro","followers_url":"https://api.github.com/users/stevecapperlinaro/followers","following_url":"https://api.github.com/users/stevecapperlinaro/following{/other_user}","gists_url":"https://api.github.com/users/stevecapperlinaro/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecapperlinaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecapperlinaro/subscriptions","organizations_url":"https://api.github.com/users/stevecapperlinaro/orgs","repos_url":"https://api.github.com/users/stevecapperlinaro/repos","events_url":"https://api.github.com/users/stevecapperlinaro/events{/privacy}","received_events_url":"https://api.github.com/users/stevecapperlinaro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceph/ceph/labels/cleanup","name":"cleanup","color":"bfe5bf"},{"url":"https://api.github.com/repos/ceph/ceph/labels/core","name":"core","color":"0052cc"},{"url":"https://api.github.com/repos/ceph/ceph/labels/needs-qa","name":"needs-qa","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"liewegas","id":433031,"avatar_url":"https://avatars.githubusercontent.com/u/433031?v=3","gravatar_id":"","url":"https://api.github.com/users/liewegas","html_url":"https://github.com/liewegas","followers_url":"https://api.github.com/users/liewegas/followers","following_url":"https://api.github.com/users/liewegas/following{/other_user}","gists_url":"https://api.github.com/users/liewegas/gists{/gist_id}","starred_url":"https://api.github.com/users/liewegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liewegas/subscriptions","organizations_url":"https://api.github.com/users/liewegas/orgs","repos_url":"https://api.github.com/users/liewegas/repos","events_url":"https://api.github.com/users/liewegas/events{/privacy}","received_events_url":"https://api.github.com/users/liewegas/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-04T15:26:12Z","updated_at":"2015-07-22T10:05:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/4864","html_url":"https://github.com/ceph/ceph/pull/4864","diff_url":"https://github.com/ceph/ceph/pull/4864.diff","patch_url":"https://github.com/ceph/ceph/pull/4864.patch"},"body":"Hi,\r\nThis is my pull request to fix a spurious assumption that the FileJournal sector size should always match the operating system PAGE_SIZE.\r\n\r\nThe patch benefits arm64 when 64KB pages are enabled and the FileJournal is hosted on a block device directly. For one rbd-bench test, my total OSD disk IO goes down from ~2.3GB to ~660MB after applying this patch.\r\n\r\nThere should be no change for x86, this may also benefit PowerPC where a larger PAGE_SIZE is used.\r\n\r\nPlease let me know if anything needs fixing. Most of the testing has been on arm64, so this could benefit from a good sanity check for x86.\r\n\r\nCheers,\r\n\r\nSteve\r\n\r\n--\r\n\r\nCeph currently assumes a FileJournal block_size equal to a multiple of\r\nCEPH_PAGE_SIZE. For x86, this will always be 4KB which matches the sector\r\nsize of Advanced Format drives, and works quite well.\r\n\r\nOther architectures, such as ARM and PowerPC, can have a much larger\r\nCEPH_PAGE_SIZE == PAGE_SIZE (64KB).\r\n\r\nUnfortunately, a block_size of 64KB can lead to a significant increase\r\nin the amount of disk activity required by the journal over one with a\r\nblock_size of 4KB (especially when carrying out a lot of 4KB writes).\r\n\r\nThis patch removes the assumption from the FileJournal that the\r\nblock_size should always be at least CEPH_PAGE_SIZE, and replaces it\r\nwith the assumption that this should be at least:\r\nCEPH_MINIMUM_BLOCK_SIZE == 4KB.\r\n\r\nFor PAGE_SIZE values of 4KB (for x86 say), this patch shouldn't lead\r\nto any change in behaviour.\r\n\r\nFor a 64KB PAGE_SIZE where the FileJournal is hosted on a block device\r\ndirectly, the block_size will go down from 64KB to 4KB with this patch.\r\nWhere the FileJournal is hosted on an ext4 filesystem we will see a\r\nsimilar reduction in block_size. If the FileJournal is hosted on an\r\nXFS or btrfs filesystem then we won't see any reduction in the block_size\r\n(because both XFS and btrfs return the PAGE_CACHE_SIZE as the minimum io\r\nblock size in fstat).\r\n\r\nSigned-off-by: Steve Capper <steve.capper@linaro.org>"},"comment":{"url":"https://api.github.com/repos/ceph/ceph/issues/comments/123649362","html_url":"https://github.com/ceph/ceph/pull/4864#issuecomment-123649362","issue_url":"https://api.github.com/repos/ceph/ceph/issues/4864","id":123649362,"user":{"login":"stevecapperlinaro","id":9270564,"avatar_url":"https://avatars.githubusercontent.com/u/9270564?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecapperlinaro","html_url":"https://github.com/stevecapperlinaro","followers_url":"https://api.github.com/users/stevecapperlinaro/followers","following_url":"https://api.github.com/users/stevecapperlinaro/following{/other_user}","gists_url":"https://api.github.com/users/stevecapperlinaro/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecapperlinaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecapperlinaro/subscriptions","organizations_url":"https://api.github.com/users/stevecapperlinaro/orgs","repos_url":"https://api.github.com/users/stevecapperlinaro/repos","events_url":"https://api.github.com/users/stevecapperlinaro/events{/privacy}","received_events_url":"https://api.github.com/users/stevecapperlinaro/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T10:05:11Z","updated_at":"2015-07-22T10:05:11Z","body":"[sorry for the late reply, just back from holiday]\r\nHi Sage, how did you come across an error? Is there anything I can look at/help with?"}}