-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smallfile improvement in glusterfs #2771
Comments
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 7, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 7, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 8, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 8, 2021
Fixes: gluster#2771 Change-Id: I510a9609452c4960b51e69643823d8ec28a65f08 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 8, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 8, 2021
Fixes: gluster#2771 Change-Id: I510a9609452c4960b51e69643823d8ec28a65f08 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 13, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc and disable mempool so enable tcmalloc and disable mempool as a default option. Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Fixes: gluster#2771 Change-Id: I0cf1509658af7db712d62eac3c5cc6c84e1bc591 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc and disable mempool so enable tcmalloc and disable mempool as a default option. Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Fixes: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: Ib51e54e10c6d7334962e41c8f277a78b676fbe5a
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc and disable mempool so enable tcmalloc and disable mempool as a default option. Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc and disable mempool so enable tcmalloc and disable mempool as a default option. Fixes: gluster#2771 Change-Id: I29256db870185d521d9b9adc2b7fd66646ed1c56 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Fixes: gluster#2771 Change-Id: Ib51e54e10c6d7334962e41c8f277a78b676fbe5a Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I4c9ec1d2f4b8df626808fe81b7392314dc8a0e05
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
The data is already available on github issue(gluster#2771) specific to getting improvement after enable tcmalloc and disable mempool so enable tcmalloc and disable mempool as a default option. Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 15, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 16, 2021
…n equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue gluster#2771 Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 16, 2021
Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 16, 2021
Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I2c598a2a3995d9300584ce3bcab4558aafc7e74d
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
Change-Id: I2c598a2a3995d9300584ce3bcab4558aafc7e74d Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
Change-Id: I2c598a2a3995d9300584ce3bcab4558aafc7e74d Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
Change-Id: I2c598a2a3995d9300584ce3bcab4558aafc7e74d Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
that referenced
this issue
Sep 17, 2021
…n equal to 128KB (#2792) * iobuf: Call standard allocation api in iobuf if page_size is less than equal 128KB During smallfile testing we have observed the performance has been improved significantly in case while iobuf use standard allocation api to allocate buffer while requested page_size is less than or equal to 128KB.The performance data is available at the github issue #2771 Change-Id: I9aebb19e15640aedea8c78efb366703dbdebb5fd Updates: #2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
The __gf_(c|m)alloc and __gf_free memory allocation api calls gf_mem_set_acct_info function to save memory accounting on xlator and to update the record it takes lock.During testing we have observed the mem_acct mutex has contention. Solution: To avoid contention make it lock free and the data is available at github issue gluster#2771 Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I9ab2a2e5b7d64e98aad92cecaa3bebc914e0a55b
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 17, 2021
The __gf_(c|m)alloc and __gf_free memory allocation api calls gf_mem_set_acct_info function to save memory accounting on xlator and to update the record it takes lock.During testing we have observed the mem_acct mutex has contention. Solution: To avoid contention make it lock free and the data is available at github issue gluster#2771 Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Credits: Xavi Hernandez <xhernandez@redhat.com> Change-Id: I9ab2a2e5b7d64e98aad92cecaa3bebc914e0a55b
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 22, 2021
Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: Ia5db076908662453e93d2bb4832ef5060be0c1cc
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 22, 2021
Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I3352c97a1b4e8b538b1e6e97e9de3b3e674d2223
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 23, 2021
Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: Ie5869e8ef4815d36f065d6f18aa78ba6507d65be
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 23, 2021
Updates gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: Ie5869e8ef4815d36f065d6f18aa78ba6507d65be
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 23, 2021
Updates gluster#2771 Signed-off-by: Mohit Agrawal moagrawa@redhat.com Change-Id: I4ce44366645151e89181907591ab65373a89f91c
mohit84
added a commit
that referenced
this issue
Sep 24, 2021
* mem_acct: Make mem_accounting lock free The __gf_(c|m)alloc and __gf_free memory allocation api calls gf_mem_set_acct_info function to save memory accounting on xlator and to update the record it takes lock.During testing we have observed the mem_acct mutex has contention. Solution: To avoid contention make it lock free and the data is available at github issue #2771 Updates #2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Credits: Xavi Hernandez <xhernandez@redhat.com> Change-Id: I9ab2a2e5b7d64e98aad92cecaa3bebc914e0a55b
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 28, 2021
The size variable does not necessary to debug mem leak from mem_acct so move the variable for debug build. Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84
added a commit
to mohit84/glusterfs
that referenced
this issue
Sep 30, 2021
Updates: gluster#2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
xhernandez
pushed a commit
that referenced
this issue
Oct 5, 2021
The size variable does not necessary to debug mem leak from mem_acct so move the variable for debug build. Updates: #2771 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
All the required patches are merged so i am closing the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As we know, we always tried to improve Smallfile performance in glusterfs.After doing a long duration testing we have found memory allocation is a big area that affects smallfile performance significantly in glusterfs. As we know before merged the patch #2675, gluster uses own thread based pool to allocate/deallocate memory blocks.In testing we observed it performs well as compare to glibc thread based pool but it does not perform well as compare to tcmalloc pool so we have decided to move to tcmalloc as a default option instead of using glibc pool.
I have executed a smallfile perf test case for 4.8M files 64K (more than 20 times on usual day operation) on latest devel branch.I have setup 12x3(nvme) volume after configure 4 event threads on 12 physical machines, there is no other configurable option i have enabled.
Hardware details:
12 physical machines (6 client, 6 servers)
Every machine is having 64 CPU 32G RAM, 10g NIC
Run smallfile tool to run operations and total number of files are 4.8M
Below is the data
During running a test case i have observed iobuf_pool lock has significant contention so i have tried to replace iobuf_pool with thread based pool(mempool). Iobuf_pool lock is process based lock so it is highly contended while we used thread based mempool we were getting performance improvement.After running multiple test cases for long duration with multiple options(iobuf_with malloc, iobuf_with_thread based pool) we have decided for the time being it is a good idea to move on standard malloc for iobuf also while a requested buffer size is less than 128k otherwise use current Iobuf pool allocation to allocate the memory.
Below is the data after using tcmalloc pool for buffer less than 128k
Along with iobuf_patch there is one minor optimization we did in memory allocation, after call gf_calloc/gf_malloc/gf_free we do take a lock for memory accounting in xlator, we did optimize it further to delete some of the variable and convert some variable to atomic to avoid a lock
Below is the result
During tcmalloc testing i have found one minor challenge with tcmalloc is it consumes more than 20% memory as compare to glibc (ptmalloc) while IO is running for long duration because it happened due to the the design of tcmalloc. After read the tcmalloc documentation i have found it provides some api’s(ReleaseMemroy) to return the excess memory to the system. In my case the client(fuse) consume at max 850M(tcmalloc) vs 700M(glibc malloc) and brick consumes 150M(tcmalloc) vs 125M(glibc malloc) so i it not much high.Later we can call tcmalloc functions to cleanup the excess memory.
A big thanks to Xavi/Yaniv for giving a guidance to make it successful.
The text was updated successfully, but these errors were encountered: