Re: [lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-03 Thread Daniel Feferman
Thanks a lot!

Best
,
Daniel


On Fri, Aug 3, 2018 at 8:21 AM Elo, Matias (Nokia - FI/Espoo) <
matias@nokia.com> wrote:

>
>
> > On 3 Aug 2018, at 13:39, Daniel Feferman  wrote:
> >
> > Hi all,
> >
> > Thanks for the feedback, while 8192 seems a small amount I think 1
> million should be sufficient enough for my application. What is the effect
> expected by setting this to the max value? Like some consequence on memory
> requirements, performance, etc?
>
> Hi,
>
> ODP linux-generic queues are implemented using rings which store 32-bit
> values. By
> default there are 1024 queues (ODP_CONFIG_QUEUES).
>
> So if my math is correct:
> 1024 * 8192 * 4 ~= 33.6MB
> 1024 * 1 048 576 * 4 ~= 4.3GB
>
> Assuming you have enough memory the performance impact should be
> negligible.
>
> -Matias
>
>


Re: [lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-03 Thread Elo, Matias (Nokia - FI/Espoo)



> On 3 Aug 2018, at 13:39, Daniel Feferman  wrote:
> 
> Hi all,
> 
> Thanks for the feedback, while 8192 seems a small amount I think 1 million 
> should be sufficient enough for my application. What is the effect expected 
> by setting this to the max value? Like some consequence on memory 
> requirements, performance, etc?

Hi,

ODP linux-generic queues are implemented using rings which store 32-bit values. 
By
default there are 1024 queues (ODP_CONFIG_QUEUES).

So if my math is correct: 
1024 * 8192 * 4 ~= 33.6MB
1024 * 1 048 576 * 4 ~= 4.3GB

Assuming you have enough memory the performance impact should be negligible.

-Matias



Re: [lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-03 Thread Daniel Feferman
Hi all,

Thanks for the feedback, while 8192 seems a small amount I think 1 million
should be sufficient enough for my application. What is the effect expected
by setting this to the max value? Like some consequence on memory
requirements, performance, etc?

Best,
Daniel

On Fri, Aug 3, 2018, 3:38 AM Bogdan Pricope 
wrote:

> I think is a better practice to use configuration file instead of
> modifying the template:
>
> ODP_CONFIG_FILE= 
>
> ODP_CONFIG_FILE=//odp/my_config.conf
> ./example/generator/odp_generator -I 1 -m r
>
>
> $ cat ./my_config.conf
> odp_implementation = "linux-generic"
> config_file_version = "0.0.1"
>
>
> queue_basic: {
> # Maximum queue size. Value must be a power of two.
> max_queue_size = 8192
>
> # Default queue size. Value must be a power of two.
> default_queue_size = 4096
> }
>
>
> On 3 August 2018 at 09:21, Elo, Matias (Nokia - FI/Espoo)
>  wrote:
> > Hi Daniel,
> >
> > The cuckoo table implementation is internally using plain queues, which
> have by default
> > a limited size of 8192 as you have noticed. You can increase this by
> changing
> > ' queue_basic.max_queue_size' in config/odp-linux-generic.conf. The
> maximum supported
> > value is currently 1 048 576. After modifying the config you have to
> either set
> > ODP_CONFIG_FILE environment variable or do 'make clean && make'.
> >
> > Would this table be large enough for your use case? If not, we have to
> think about updating
> > the cuckoo table implementation.
> >
> > Regards,
> > Matias
> >
> >
> >> On 2 Aug 2018, at 21:31, Daniel Feferman  wrote:
> >>
> >> Hi all,
> >>
> >> I was using odph_cuckoo_table_create on version 19 and it seems the
> >> capacity field can only take up to 8192, after that the function return
> >> NULL (not able to create). Since capacity is set to a type uint32_t I
> was
> >> not expecting this behavior, am I doing something wrong? Or the
> function is
> >> really set to handle just 8192?
> >>
> >> Best,
> >> Daniel
> >
>