Re: FreeBSD performance on single CPU.

From: Channa <channa.kad_at_gmail.com>
Date: Thu, 20 Nov 2008 09:50:20 +0530
Hi,
Yes i have recompiled the libc after removing the MALLOC_DEBUG.
I am trying to compare with the linux malloc performance (i.e. glibc malloc).

I want to use the FreeBSD malloc in my own library so after putting it
in my own library
i am  comparing with linux malloc performance with the freebsd malloc.

I compared without changing the request and the size too but i could not
observe the performance of freeBSD malloc to be same as the mailing
list link i gave you in the
first mail.

So my doubt whether freeBSD malloc should show the same performance on
single CPU?

Thanks in Advance,
Channa

2008/11/19 Ivan Voras <ivoras_at_freebsd.org>:
> Channa wrote:
>> Hi,
>> Thank you very much for your information.
>>
>> I am using current implementation of FreeBSD malloc.
>> I am checking the performance on single CPU machine.
>>
>> I am using it in my own environment i am not using FreeBSD7.0.
>>
>> I disabled the MALLOC_DEBUG option in the malloc implementaton
>> and checked the performance i see no difference the results are the same.
>>
>> ./mallco-test
>> Starting test...
>> Thread -1101005488 adjusted timing: 4.495931 seconds for 1000000
>> requests of 512 bytes.
>>
>> Could please tell me if anything else needs to be changed.?
>
> Yes, you need to disable kernel debugging also. (you have recompiled
> libc after removing MALLOC_DEBUG, right?).
>
> Also, it looks like your comparisons have problems. You are changing the
> number of requests and request size.
>
> Finally, to what are you actually comparing the malloc performance to?
> Why are you trying to benchmark it?
>
>
>> 2008/11/19 Ivan Voras <ivoras_at_freebsd.org>:
>>> Channa wrote:
>>>> Hi,
>>>>
>>>> I am using FreeBSD malloc from the current working branch.
>>>> I hope its jemalloc.
>>>>
>>>> I tested it on a single CPU machine i could get the following results
>>>>
>>>> # ./malloc-test  1024 10000000 4
>>>>
>>>> Starting test...
>>>> Thread -1096811184 adjusted timing: 102.369100 seconds for 10000000
>>>> requests of 1024 bytes.
>>>> Thread -1101005488 adjusted timing: 103.212512 seconds for 10000000
>>>> requests of 1024 bytes.
>>>> Thread -1098908336 adjusted timing: 103.491399 seconds for 10000000
>>>> requests of 1024 bytes.
>>>> Thread -1094714032 adjusted timing: 103.605124 seconds for 10000000
>>>> requests of 1024 bytes.
>>>>
>>>> I checked the result in the FreeBSD mailing list link given below:
>>>>
>>>> http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2005-12/msg00294.html
>>>>
>>>> The jemalloc gives very good results. Is that the performance is good
>>>> only on SMP?
>>>>
>>>> Or on single processor also it should perform well?
>>>>
>>>> But on single CPU i could see bad results.
>>>>
>>>> Could anyone help me out?
>>> Your message is not very clear but here are some things that might help you:
>>>
>>> 1) -CURRENT has debugging enabled both in kernel and in malloc. You need
>>> to disable both before benchmarking anything.
>>> 2) According to the post you linked, jemalloc should be 1.1 times faster
>>> for single-threaded processes than phkmalloc, on that particular
>>> benchmark. This benefit will probably also be visible on single-CPU
>>> machines.
>>> 3) You don't need to run -CURRENT to get jemalloc - it is also prosent
>>> in 7.0.
>>>
>>>
>> _______________________________________________
>> freebsd-current_at_freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>>
>
>
Received on Thu Nov 20 2008 - 03:20:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:37 UTC