[Gluster-devel] Can we replace strcpy calls with memcpy?

Pranith Kumar Karampuri pkarampu at redhat.com
Mon Mar 24 07:29:43 UTC 2014


hi Atin,
    Based on my understanding of gluster, calls that affect performance significantly are syscalls and over the network calls i.e. rpcs. IMO this change should not cause performance changes.
But data speaks for itself, so I suggest you do the following:

Following is one of the perf-tests that we use whenever some performance related change is introduced.
https://github.com/avati/perf-test/blob/master/perf-test.sh

Get the latest numbers on non-vms without the change (avg of 3 runs)

Introduce the change you are suggesting and do the same again and see for yourself if there are any improvements. Post the numbers, if there are improvements then the patch will be taken in :-), and from then on we can follow this convention.

Pranith
----- Original Message -----
> From: "Atin Mukherjee" <amukherj at redhat.com>
> To: gluster-devel at nongnu.org
> Sent: Monday, March 24, 2014 12:35:14 PM
> Subject: [Gluster-devel] Can we replace strcpy calls with memcpy?
> 
> Hi List,
> 
> In GlusterFS codebase, strcpy() calls have been used in many places. IMO, if
> we can replace strcpy calls with memcpy() we would get a performance bonus
> as memcpy directly interacts with memory area. I am posting this suggestion
> based on my earlier project experience where we have seen a significant
> difference of performance with this replace.
> 
> Please feel free to add if you think otherwise.
> 
> Regards,
> Atin Mukherjee
> Senior Software Engineer
> E-9, Extn : 73196, Direct : 08039245196, Mobile: +919739491377
> Email - amukherj at redhat.com
> 
> 
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> https://lists.nongnu.org/mailman/listinfo/gluster-devel
> 




More information about the Gluster-devel mailing list