Quantcast

How big should we make the JDT cache?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How big should we make the JDT cache?

Stefan Xenos-3
The new JDT index uses a cache of (configurable) fixed size. The optimal size of the cache is the smallest we can make it before performance starts to degrade in a large highly fragmented database. This can only be determined experimentally by measuring the performance of the database on various benchmarks with different cache sizes. This hasn't been done yet (and probably shouldn't until the db format is stable).


So the question is: How much memory can we allocate to the cache right now as a temporary measure until we have better data?


When I first submitted the index, I used a cache size of 5 MB. We had a number of bug reports about freezes due to poor cache utilization so I changed the cache size to match the size of the CDT cache (256MB or 10% total heap space, whatever is smaller).

Andrey was concerned about the memory usage and filed this bug:


...but I realized that this shouldn't be my decision to make since we all need to share the RAM. :-)

My inclination is to keep it as-is -- leave the JDT cache at exactly the same size as the CDT cache. That way, if there are any differences in performance between JDT and CDT we can rule out differences in the cache size as the cause. Once the rest of the DB format is fully stablized, we can use some benchmarks to take measurements and work out what the real optimal cache size is. I suspect it will be a lot lower than 256MB.

However, if the JDT core community (and my project leads in particular) feel differently, I'm happy to live with that decision.

  - Stefan

_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How big should we make the JDT cache?

Stefan Xenos-3
I guess another approach would be to make it something like 16 megs and then keep doubling it every few weeks as long as we're seeing reports of poor cache utilization in large databases.

On Wed, Mar 1, 2017 at 10:44 AM, Stefan Xenos <[hidden email]> wrote:
The new JDT index uses a cache of (configurable) fixed size. The optimal size of the cache is the smallest we can make it before performance starts to degrade in a large highly fragmented database. This can only be determined experimentally by measuring the performance of the database on various benchmarks with different cache sizes. This hasn't been done yet (and probably shouldn't until the db format is stable).


So the question is: How much memory can we allocate to the cache right now as a temporary measure until we have better data?


When I first submitted the index, I used a cache size of 5 MB. We had a number of bug reports about freezes due to poor cache utilization so I changed the cache size to match the size of the CDT cache (256MB or 10% total heap space, whatever is smaller).

Andrey was concerned about the memory usage and filed this bug:


...but I realized that this shouldn't be my decision to make since we all need to share the RAM. :-)

My inclination is to keep it as-is -- leave the JDT cache at exactly the same size as the CDT cache. That way, if there are any differences in performance between JDT and CDT we can rule out differences in the cache size as the cause. Once the rest of the DB format is fully stablized, we can use some benchmarks to take measurements and work out what the real optimal cache size is. I suspect it will be a lot lower than 256MB.

However, if the JDT core community (and my project leads in particular) feel differently, I'm happy to live with that decision.

  - Stefan


_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How big should we make the JDT cache?

Manoj Palat-2

Hi Stefan,
I would vote for the incremental approach as you suggested - start with 16MB (if that's minimum viable) and double(or add a delta) every few weeks after observation.

Regards,
Manoj

Inactive hide details for Stefan Xenos ---03/02/2017 02:21:57 AM---I guess another approach would be to make it something like Stefan Xenos ---03/02/2017 02:21:57 AM---I guess another approach would be to make it something like 16 megs and then keep doubling it every

From: Stefan Xenos <[hidden email]>
To: "Eclipse JDT Core developers list." <[hidden email]>
Date: 03/02/2017 02:21 AM
Subject: Re: [jdt-core-dev] How big should we make the JDT cache?
Sent by: [hidden email]





I guess another approach would be to make it something like 16 megs and then keep doubling it every few weeks as long as we're seeing reports of poor cache utilization in large databases.

On Wed, Mar 1, 2017 at 10:44 AM, Stefan Xenos <[hidden email]> wrote:
    The new JDT index uses a cache of (configurable) fixed size. The optimal size of the cache is the smallest we can make it before performance starts to degrade in a large highly fragmented database. This can only be determined experimentally by measuring the performance of the database on various benchmarks with different cache sizes. This hasn't been done yet (and probably shouldn't until the db format is stable).


    So the question is: How much memory can we allocate to the cache right now as a temporary measure until we have better data?


    When I first submitted the index, I used a cache size of 5 MB. We had a number of bug reports about freezes due to poor cache utilization so I changed the cache size to match the size of the CDT cache (256MB or 10% total heap space, whatever is smaller).

    Andrey was concerned about the memory usage and filed this bug:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=511693

    ...but I realized that this shouldn't be my decision to make since we all need to share the RAM. :-)

    My inclination is to keep it as-is -- leave the JDT cache at exactly the same size as the CDT cache. That way, if there are any differences in performance between JDT and CDT we can rule out differences in the cache size as the cause. Once the rest of the DB format is fully stablized, we can use some benchmarks to take measurements and work out what the real optimal cache size is. I suspect it will be a lot lower than 256MB.

    However, if the JDT core community (and my project leads in particular) feel differently, I'm happy to live with that decision.

      - Stefan
_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev



_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How big should we make the JDT cache?

Stefan Xenos-3
Manoj, I've received some insightful comments over email last night. In order to keep this discussion in one place, let's move the discussion to the bug:



On Wed, Mar 1, 2017 at 9:55 PM, Manoj Palat <[hidden email]> wrote:

Hi Stefan,
I would vote for the incremental approach as you suggested - start with 16MB (if that's minimum viable) and double(or add a delta) every few weeks after observation.

Regards,
Manoj

Inactive hide details for Stefan Xenos ---03/02/2017 02:21:57 AM---I guess another approach would be to make it something like Stefan Xenos ---03/02/2017 02:21:57 AM---I guess another approach would be to make it something like 16 megs and then keep doubling it every

From: Stefan Xenos <[hidden email]>
To: "Eclipse JDT Core developers list." <[hidden email]>
Date: 03/02/2017 02:21 AM
Subject: Re: [jdt-core-dev] How big should we make the JDT cache?
Sent by: [hidden email]





I guess another approach would be to make it something like 16 megs and then keep doubling it every few weeks as long as we're seeing reports of poor cache utilization in large databases.

On Wed, Mar 1, 2017 at 10:44 AM, Stefan Xenos <[hidden email]> wrote:
    The new JDT index uses a cache of (configurable) fixed size. The optimal size of the cache is the smallest we can make it before performance starts to degrade in a large highly fragmented database. This can only be determined experimentally by measuring the performance of the database on various benchmarks with different cache sizes. This hasn't been done yet (and probably shouldn't until the db format is stable).


    So the question is: How much memory can we allocate to the cache right now as a temporary measure until we have better data?


    When I first submitted the index, I used a cache size of 5 MB. We had a number of bug reports about freezes due to poor cache utilization so I changed the cache size to match the size of the CDT cache (256MB or 10% total heap space, whatever is smaller).

    Andrey was concerned about the memory usage and filed this bug:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=511693

    ...but I realized that this shouldn't be my decision to make since we all need to share the RAM. :-)

    My inclination is to keep it as-is -- leave the JDT cache at exactly the same size as the CDT cache. That way, if there are any differences in performance between JDT and CDT we can rule out differences in the cache size as the cause. Once the rest of the DB format is fully stablized, we can use some benchmarks to take measurements and work out what the real optimal cache size is. I suspect it will be a lot lower than 256MB.

    However, if the JDT core community (and my project leads in particular) feel differently, I'm happy to live with that decision.

      - Stefan
_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev



_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev


_______________________________________________
jdt-core-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
Loading...