Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hudson-dev] Plugin development: Job information in memory or disk

HI Henrik

The Job and Build objects are held by soft references in an MRU cache, so any object that is referenced by those will be pinned and consequentially any object that is only pinned by that reference will be released when the corresponding Job or Build is released.

The cache can be tweaked - see here https://blogs.oracle.com/royvarghese/entry/tweaking_hudson_memory_usage

If a plugin is creating and holding its own data, this feature does not affect or optimize it. If the plugin can derive the data from the build/job as/when required, its probably better to it that way rather than generate and store.

-Roy


On 12/02/2015 01:48 PM, Winston Prakash wrote:
Adding Roy, who implemented this feature, to this thread.

Roy, could you please answer these questions.

Thanks,

Winston

On 12/2/2015 1:04 PM, Henrik Lynggaard Hansen wrote:
Hi

I know the recent Hudson versions does not keep everything in memory like the old pre-jenkins versions did.

As far as I know it only keeps basic job information and maybe recent build in memory but history and other rarely accessed parts are left on disk.

My question is related to how a plugin developer can take advantage of this functionality.

* What can I in a plugin do to ensure my information is kept in memory if it is an often used piece of information (to avoid heavy disk i/o)

* What can I in a plugin do to let my information be evicted from memory ?

* Once a piece of information is retrieved from disk, how long does it stay in memory and what is the eviction policy?

Best Regards
Henrik




_______________________________________________
hudson-dev mailing list
hudson-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/hudson-dev



Back to the top