A fast object pool for the JVM

Overview

Stormpot

Stormpot is an object pooling library for Java. Use it to recycle objects that are expensive to create. The library will take care of creating and destroying your objects in the background.

Build status Code quality Code coverage

Stormpot is very mature, is used in production, and has done hundreds of trillions [1] claim-release cycles in testing. It is faster and scales better than any competing pool.

Why choose Stormpot?

There are a number of options out there, when it comes to object pools on the JVM. Stormpot has been carefully designed for high performance, and robust operation. Some of the things that sets Stormpot apart include:

  • Business friendly Apache 2 license.

  • Very high test coverage.

  • The highest throughput and lowest latency in its class. (since 2.1)

  • Automatic recovery from sporadic backend (Allocator) failures. (since 2.2)

  • Precise object leak detection with virtually no overhead. (since 2.3)

  • Optional background object expiration checking. (since 2.3)

  • Explicit object expiration. (since 2.4)

  • Gradual back-off for prolonged allocation failures. (since 3.0)

  • Support for Java Platform Module system. (since 3.0)

  • Support for a directly-allocating thread-less mode, via Pool.of(…​). (since 3.0)

  • Convenient lambda-based API. (since 3.0)

  • Control over the thread-local caching mechanics, via PoolTaps. (since 3.0)

  • Support for operating without a background thread, via Pool.fromInline(). (since 3.1)

  • Support for configuring zero-sized (dormant) pools. (since 3.1)

  • And other features that makes for a smooth runtime behaviour.

Note

Stormpot is an object pool; a homogeneous collection of objects, where it does not matter which particular instance is returned from claim since the objects are all similar. If your objects instead are heterogeneous, with different attributes and identified by a key, then what you need is a object cache. We recommend Caffeine for object caching.

Installing

Stormpot 3.1 only depends on Java 11 or newer. Add it as a Maven dependency to your projects:

<dependency>
  <groupId>com.github.chrisvest</groupId>
  <artifactId>stormpot</artifactId>
  <version>3.1</version>
</dependency>

You can also build the latest snapshot from source with mvn clean install.

Getting Started

Stormpot needs 3 things before it can pool objects for you:

  1. A Poolable type of objects it can pool. You have to implement this yourself.

  2. An Allocator to allocate and deallocate the Poolable objects. You have to implement this yourself.

  3. And a place where it all comes together:

MyAllocator allocator = new MyAllocator();
Pool<MyPoolable> pool = Pool.from(allocator).build();
Timeout timeout = new Timeout(1, TimeUnit.SECONDS);

MyPoolable object = pool.claim(timeout);
try {
  // Do stuff with 'object'.
  // Note: 'claim' returns 'null' if it times out.
} finally {
  if (object != null) {
    object.release();
  }
}

Contributing

  • Report bugs preferably with a failing test. You can submit a pull-request that adds a failing test that demonstrates the behaviour you think is wrong or missing. Travis-CI will build it, report the failure and shorten the feedback cycle. If you don’t know how to write a test for something, then that’s fine too. Just open an issue describing your configuration and environment, what you observe, and what you think should happen instead.

  • Improve the documentation by all means! Just fork the project and start. If you have questions about implementation or behavioural details, then start a discussion about it by opening a pull-request or an issue. Documentation and javadoc is formatted with AsciiDoctor. The website and javadocs can be generated with mvn clean pre-site javadoc:javadoc.

  • Fix bugs or implement features by forking the project, but please start an issue about the bug or feature you want to work on (or find the existing issue) and describe the approach and design you have in mind. Keep in mind that Stormpot is implemented with a very strict adherence to TDD. Finally, make sure to respect the existing indentation and formatting. Use mvn checkstyle:check to check your formatting. If you are writing a test that takes more than a few hundred milliseconds to run, then put it in the stormpot.slow test package; either in the existing PoolIT suite, or in a new *IT suite. Use mvn clean test to run only the fast tests. Use mvn clean verify to also run the slow tests. Javadoc comments are formatted with AsciiDoctor. Get test coverage with mvn clean test site and open target/site/jacoco/index.html. Get mutation test coverage with mvn clean test-compile org.pitest:pitest-maven:mutationCoverage and open target/pit-reports/*/index.html.

  • Update Maven plugins with mvn versions:display-plugin-updates, or other dependencies with versions:display-dependency-updates.

  • Add to the ecosystem and make Stormpot more than just an object pool. This is a good thing to take on if you’d like to contribute code, but you find the Stormpot code base itself to be intimidating (which, by the way, I completely understand).

    • There is a repository for object pool benchmarks that is being maintained along side Stormpot. Adding more benchmarks and cases; analysing results; trying out optimisations. These are all useful things to do.

    • I started working on a JDBC connection pool based on Stormpot, but the project has stagnated. It is no doubt a useful thing to have, though. If you want to take on that problem, either with offset in the existing code or by starting over from scratch, then please go ahead.

    • I’m sure there are other interesting related problems out there to take on. There are many database drivers for various NoSQL databases, that have object pooling needs.

Whatever you decide to do, don’t hesitate to ask questions on the mailing list or on github if you have doubts or get stuck.


1. Fermi estimate.
Comments
  • Adding a CompoundExpiration

    Adding a CompoundExpiration

    This makes it easy to compose Expirations.

    Not sure if it make sense to include this in the core stormpot, but if you think it does, here is the code. It is useful for me, it might be for someone else ...

    opened by gehel 17
  • Is lazy allocation supported?

    Is lazy allocation supported?

    I just noticed that Stormpot preemptively allocates in the background until the target size has been met. Can this be turned off so that the objects are lazily allocated (ie. when a claim comes in and size < targetSize then allocate new object)?

    I'm pooling short-lived server connections and I really don't want these to be allocated by Stormpot on the first claim, especially at times they're not needed.

    opened by bbottema 16
  • Use Executor instead of creating own threads

    Use Executor instead of creating own threads

    Pools, or the QueuePool at least, should be able to take an Executor or similar through the Config. The Executor should be used instead of the allocation thread. I'm not entirely sure why this is a brilliant idea, but Viktor Klang thought it was important for Journal.IO, so it might also be important here. I should probably ask him about it.

    feature performance 
    opened by chrisvest 9
  • Awaiting Whirlpool shutdown may deadlock

    Awaiting Whirlpool shutdown may deadlock

    It was discovered during a benchmark run, that the Whirlpool implementation can deadlock when you await the completion of the shutdown procedure.

    Thread dump:

    "Whirlpool-Allocator-Thread for stormpot.benchmark.PoolSpin$SlowAllocator@11f2ee1" prio=10 tid=0x780d7800 nid=0x773c runnable [0x778fe000]
       java.lang.Thread.State: TIMED_WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for  <0x7c4f0358> (a stormpot.whirlpool.Request)
      at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
      at stormpot.whirlpool.Request.await(Request.java:53)
      at stormpot.whirlpool.Whirlpool.perform(Whirlpool.java:220)
      at stormpot.whirlpool.Whirlpool.relieve(Whirlpool.java:145)
      at stormpot.whirlpool.WpAllocThread.deallocateAll(WpAllocThread.java:132)
      at stormpot.whirlpool.WpAllocThread.run(WpAllocThread.java:69)
    
       Locked ownable synchronizers:
      - None
    
    "main" prio=10 tid=0x0978c800 nid=0x7731 waiting on condition [0xb6a92000]
       java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for  <0x7c5298b0> (a java.util.concurrent.CountDownLatch$Sync)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
      at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
      at stormpot.whirlpool.WpAllocThread.await(WpAllocThread.java:53)
      at stormpot.benchmark.PoolSpin.tearDown(PoolSpin.java:84)
      at stormpot.benchmark.ContendedPoolSpin.tearDown(ContendedPoolSpin.java:54)
      at com.google.caliper.SimpleBenchmark$1.close(SimpleBenchmark.java:139)
      at com.google.caliper.TimeMeasurer.measureReps(TimeMeasurer.java:177)
      at com.google.caliper.TimeMeasurer.warmUp(TimeMeasurer.java:62)
      at com.google.caliper.TimeMeasurer.run(TimeMeasurer.java:122)
      at com.google.caliper.InProcessRunner.run(InProcessRunner.java:74)
      at com.google.caliper.InProcessRunner.run(InProcessRunner.java:49)
      at com.google.caliper.InProcessRunner.main(InProcessRunner.java:103)
    
       Locked ownable synchronizers:
      - None
    
    bug 
    opened by chrisvest 9
  • Exceptions can bubble from Allocator#allocate to Pool#claim more than once

    Exceptions can bubble from Allocator#allocate to Pool#claim more than once

    See test case added as 0484a6afbd13bdf3d11a48a3d481061cafd475bb in https://github.com/simongibbsft/stormpot/tree/2.1

    This demonstrates that in some scenarios an exception raised during allocation of a new poolable can be propagated to clients on more than one occasion.

    In our logs we can see timestamped exception objects being rethrown over very long periods, causing a brief outage of the dependee system to become artificially long-lived requiring a sysop to reboot the dependant system.

    bug 
    opened by simongibbs 8
  • Issue in BlazePool shutdown after (expire + release) on a slot for an object

    Issue in BlazePool shutdown after (expire + release) on a slot for an object

    I'm trying to use stormpot 2.4.1 for a project and ran into an issue where in objects are not deallocated after pool shutdown. Initially, I thought it was an issue with how I'm using stormpot and that objects are being leaked in my application, but later I managed to repro it through a simple test

    Here's what I'm trying to do:

    1. Maintain a map of id -> StormPot pool, where each pool has about 16 objects in steady state
    2. At some point, I figure out that I need to recreate a pool for a given id, at which point I do

    BlazePool p = poolMap.get(id); Completion c = p.shutdown(); c.await(new Timeout(100, TimeUnit.MILLISECONDS)); poolMap.put(id, new BlazePool(config));

    1. The actual logic is a little more complicated since I can have unreleased objects at the time of pool shutdown, and I handle it in the application (the object has a reference to the pool so that I can release it to the pool).

    2. In the normal (pool is not shutdown) case, I do either of the following in order to release an object back to the pool (depending on the state of the object).

    slot.release(this); OR slot.expire(this); slot.release(this);

    The issue I'm seeing is that whenever I expire + release a claimed object, and follow it up by shutting down the pool, the released object is never de-allocated.

    I reproduced the issue in a simple test by doing the following

    1. create 2 pools, one BlazePool and one QueuePool
    2. claim an object from each pool
    3. expire+release the object back to the respective pools
    4. shutdown both pools and await for 10 seconds

    I observed that only the released QueuePool object is deallocated, the BlazePool object is never deallocated. Also, this issue does not show up when I replace (expire + release) with a simple (release).

    Please let me know if you need any additional information.

    bug 
    opened by chandramouli-r 6
  • Claim for newly created object first

    Claim for newly created object first

    I'm actually using Stormpot to build a socket client pool. I need to ensure that every claimed object is a Poolable that is connected to a server. So first I test the connection by sending a simple message to the server, and if it gets and exception I mark it as invalid. I repeat it until I get a valid object (conneted to the server). You can see that if there are 50 objects in the pool, I will have to test 50 times... Is there any way to get the newly allocated object instead of another object in the pool? This way I will have to test only once.

    opened by abarazal 6
  • Double-Lane Queue

    Double-Lane Queue

    A lot of contention in the QueuePool implementation comes from the use of blocking queues.

    Another non-blocking live-queue could be added as a fast-path option: claims would take from the non-blocking live-queue first, and only if it turns out to be empty, try to take from the blocking live-queue (with timeout logic, etc.)

    The blocking live-queue will have to be bounded such that it is smaller than the maximum number of elements in the pool. Since the pool is resizable, the only real option for a bound is 1.

    It must be bounded, because the allocation thread will have to release new live objects into the blocking live-queue first, and only if it's full, insert them into the non-blocking live-queue. This way, we ensure that if the pool has been depleted, the new object will allow a thread waiting in claim to make progress.

    performance 
    opened by chrisvest 6
  • Introduce basic checkstyle configuration

    Introduce basic checkstyle configuration

    Style is now check during build at verify phase. Configuration is minimal and only checks for 2-space indentation at the moment. It can obviously be extended as required.

    Build will fail if violations are found.

    fixes #97

    opened by gehel 5
  • Poolable release vs close

    Poolable release vs close

    I'm trying to create an pool-agnostic poolable resource and one thing I bump into that is not a big issue, but kinda ugly, is that Poolable defines release vs. close. Personally, I would like it if Poolable implemented AutoClosable with #close instead of #release. I'm not sure if there was a reason for this or if it is just legacy but it seems like if you are pooling Database Connections, Sockets, Files, or Redis Clients, you are going to want to have the typical #close method delegate to your #release.

    Not a big deal, and I wouldn't want you to break backwards compatibility but I just thought I'd mention it.

    opened by rdifalco 5
  • Add tests to ensure correct behaviour on shutdown

    Add tests to ensure correct behaviour on shutdown

    As-is these revisions will cause the build to fail due to an error hanling this scenario:

    • Server starts up and creates it's back end, inlcuding a pool.
    • Server creates its front end, including Jetty bound to a port.
    • Server set up fails as the port is already bound.
    • Server handles the failure, including calling pool.shutdown()

    Expected behaviour:

    • Process exits cleanly.

    Actual behaviour.

    • The allocator thread remains open, preventing the JVM from terminating.

    The revisions expose the problem in a unit test and add minor feature to assign predictable names to threads (which can then be asserted on).

    opened by simongibbs 5
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi chrisvest/stormpot!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

    Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 0
  • implementation of allocated, in-use metrics

    implementation of allocated, in-use metrics

    issue #148 feature request for more metrics initial first stab

    Project tests wouldn't run on the java 11 version I had without the pom upgrades

    I've not worked out testing yet

    opened by msillence 3
  • enhance metrics

    enhance metrics

    Though the current metrics are useful we'd really like to see how many connections are in the pool and how many are available/in use.

    We'd use this to:

    1/ actual pool size - see if there were some allocation problem - e.g. the pool collapses due to some network or other problem

    2/ pool available connections - see trends in available connections for tuning - reducing if we've over provisioned and increasing if we're near the limit - I guess the average time to get a connection from the pool might imply we've started to hit a pool size issue but it's not quite the same as being able to see the trend before we hit increases in getting a connections

    opened by msillence 1
  • #143 Solution to compile stormpot with GraalVM.

    #143 Solution to compile stormpot with GraalVM.

    This is a temporary solution to compile natively using GraalVM (#143). Does not affect any other scenario. May be removed when this issue is solved: https://github.com/oracle/graal/issues/3028

    opened by begrossi 1
  • Support GraalVM native compilation

    Support GraalVM native compilation

    I'm trying to compile stormpot jar with my application using GraalVM native-image compiler, and I'm getting only 2 errors, that looks simple to resolve.

    Error: Unsupported features in 2 methods
    Detailed message:
    Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: VarHandle object must be a compile time constant
    Trace: 
            at parsing stormpot.PaddedAtomicInteger.compareAndSet(BSlot.java:190)
    Call path from entry point to stormpot.PaddedAtomicInteger.compareAndSet(int, int): 
            at stormpot.PaddedAtomicInteger.compareAndSet(BSlot.java:190)
            at stormpot.BSlot.live2dead(BSlot.java:98)
            at stormpot.BAllocThread.shutPoolDown(BAllocThread.java:242)
            at stormpot.BAllocThread.run(BAllocThread.java:90)
            at java.lang.Thread.run(Thread.java:834)
            at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
            at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
            at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
    Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: VarHandle object must be a compile time constant
    Trace: 
            at parsing stormpot.PaddedAtomicInteger.lazySet(BSlot.java:194)
    Call path from entry point to stormpot.PaddedAtomicInteger.lazySet(int): 
            at stormpot.PaddedAtomicInteger.lazySet(BSlot.java:194)
            at stormpot.BSlot.dead2live(BSlot.java:82)
            at stormpot.BAllocThread.continuouslyReplenishPool(BAllocThread.java:105)
            at stormpot.BAllocThread.run(BAllocThread.java:89)
            at java.lang.Thread.run(Thread.java:834)
            at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
            at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
            at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
    

    It's solved using a native-image.properties file with an argument to initialize this class at compile time: Args = --initialize-at-build-time=stormpot.PaddedAtomicInteger

    But I think that maybe it's better to remove the using of VarHandle feature. Is it really necessary?

    opened by begrossi 2
  • [Feature Request] Larger Object Pool

    [Feature Request] Larger Object Pool

    Stormpot is going great for my Load Balancer but sometimes during peak usages, the object pool is hitting 1.2B objects. Stormpot uses int so the maximum object pool size is limited to 2B.

    Do we have plans to support a larger object pool (greater than 2B) using long?

    opened by hyperxpro 5
Releases(stormpot-3.1)
  • stormpot-3.1(Jun 17, 2020)

    Stormpot 3.1 is fully backwards compatible with 3.0, but adds a number of new features:

    • It is now possible to create pools with a size of zero, and to change the target size of a pool to be zero. Such pools will behave as if they are perpetually depleted, that is, as if all of their objects have been claimed. These empty pools can still have their target size increased at any later time.
    • A new “inline” pool mode has been added. In this mode there is no background thread, and thus none of the background services are available. Object allocation and deallocation instead occur inline with the claim calls, hence the name. This means that these pools are lighter on CPU and memory resources.
    Source code(tar.gz)
    Source code(zip)
  • stormpot-3.0.1(May 15, 2020)

    This is a patch-release that fixes a bug where explicitly expired objects would not get to be deallocated by the configured allocator, when the pool was shut down. #135

    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.4.2(May 15, 2020)

    This is a patch-release that fixes a bug where explicitly expired objects would not get to be deallocated by the configured allocator, when the BlazePool was shut down. #135

    Source code(tar.gz)
    Source code(zip)
  • stormpot-3.0(Nov 10, 2019)

    Major release.

    • Java 11 is now the minimum required version.
    • Updated, modern, and ergonomic APIs.
    • Pools are now created with Pool.from(allocator).build().
    • There is only a single pool implementation now.
    • New Pool.of(...) API to create a pool with pre-allocated objects, and no background thread.
    • Improved handling of prolonged allocation failures.
    • Lower idle CPU usage.
    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.4.1(Jun 1, 2016)

    This is a bug-fix release, that fixes a couple of cases where the background thread could get stuck at 100% CPU usage when objects are explicitly expired, or the pool is shrunk while there are poisoned slots.

    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.4(Sep 6, 2015)

    Performance release.

    • Improved performance of Slot.release in the BlazePool implementation, by making it do a lazySet of the slot status, instead of a compareAndSet.
    • Claimed objects can now be explicitly expired with the Slot.expire method, if they are discovered to have expired after they were claimed.
    • New CompoundExpiration that can combine two expiration policies.
    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.3(Nov 22, 2014)

    Feature release:

    • A new ManagedPool interface exposes a pool as an MXBean for management with JMX.
    • It is now possible to enable background expiration checking, which helps reduce tail latency and prevents reallocation storms after prolonged periods of inactivity.
    • It is now possible to supply a custom ThreadFactory that the pool can use for creating its background allocation thread.
    • A precise object leak detection mechanism has been added, and is enabled by default. It can detect when a program leaks claimed objects by losing the references to them.
    • All the documentation is now formatted with AsciiDoctor.
    • Stormpot now builds on Java 8.
    • The pool no longer shuts down when an InterruptedException is thrown from the allocators allocate() or reallocate() methods.
    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.2(Mar 14, 2014)

    Lots of incremental improvements:

    • False sharing has been reduced in the BlazePool implementation, improving performance.
    • Numerous adjustments to the BlazePool implementation to improve inlining and optimisation behaviour, improving performance.
    • Fix a bug in BlazePool where the exception in a poisoned slot could bubble out through claim() calls more than once.
    • Fix a bug where the Allocator could eat the interrupt that was meant to signal to the allocation thread that it should begin shutting down. This signal is now no longer missed.
    • Poisoned slots are now proactively reallocated, if possible. This way, a temporary outage that then resolves itself, won't leave the pool full of poisoned slots that each have to bubble up through a claim() call before they can be reallocated.
    • Expiration.hasExpired() is now allowed to throw exceptions.
    • A new Reallocator API has been added. It can potentially reduce old-gen garbage accretion, in cases where Poolable instances can be reused across deallocate/allocate calls.
    • A new TimeSpreadExpiration has been added and made the default Expiration. It prevents all slots in the pool from expiring all at once.
    • Tons of fuzzing and stress testing have been performed. No released bugs found, though.
    Source code(tar.gz)
    Source code(zip)
  • stormpot-2.1(Jul 2, 2013)

Owner
Chris Vest
Kernel page table entries added and removed here 🙃
Chris Vest
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

RxJava: Reactive Extensions for the JVM RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-base

ReactiveX 46.7k Dec 30, 2022
jproblemgenerator creates scenarios in which Java programs leak memory or crash the JVM

jproblemgenerator creates scenarios in which Java programs leak memory or crash the JVM. It is intended to train the use of debugging tools

null 1 Jan 6, 2022
Immutable key/value store with efficient space utilization and fast reads. They are ideal for the use-case of tables built by batch processes and shipped to multiple servers.

Minimal Perfect Hash Tables About Minimal Perfect Hash Tables are an immutable key/value store with efficient space utilization and fast reads. They a

Indeed Engineering 92 Nov 22, 2022
RTree2D is a 2D immutable R-tree with STR (Sort-Tile-Recursive) packing for ultra-fast nearest and intersection queries

RTree2D RTree2D is a 2D immutable R-tree with STR (Sort-Tile-Recursive) packing for ultra-fast nearest and intersection queries. Goals Main our requir

Andriy Plokhotnyuk 121 Dec 14, 2022
Fast integer compression in C using the StreamVByte codec

streamvbyte StreamVByte is a new integer compression technique that applies SIMD instructions (vectorization) to Google's Group Varint approach. The n

Daniel Lemire 281 Dec 27, 2022
Fast campus 강의 '현실 세상의 TDD' 실습에 사용된 예제 코드를 제공합니다.

현실 세상의 TDD 실습 코드 Fast campus 강의 '현실 세상의 TDD' 실습에 사용된 예제 코드를 제공합니다. 예제 코드는 강의 촬영 전에 미리 준비되었고 강의 촬영 시 라이브 코딩이 진행되었기 때문에 세부 코드는 강의 영상에서 보는 것과 다를 수 있습니다.

Gyuwon Yi 170 Jan 2, 2023
Simple, fast Key-Value storage. Inspired by HaloDB

Phantom Introduction Phantom is an embedded key-value store, provides extreme high write throughput while maintains low latency data access. Phantom w

null 11 Apr 14, 2022
🔥 强大的动态线程池,附带监控线程池功能(没有依赖任何中间件)。Powerful dynamic thread pool, does not rely on any middleware, with monitoring thread pool function.

ThreadPool, so easy. 动态线程池监控,主意来源于美团技术公众号 点击查看美团线程池文章 看了文章后深受感触,再加上最近线上线程池的不可控以及不可逆等问题,想做出一个兼容性、功能性、易上手等特性集于一身的的开源项目。目标还是要有的,虽然过程可能会艰辛 目前这个项目是由作者独立开发,

龙台 3.4k Jan 3, 2023
🔥 强大的动态线程池,附带监控线程池功能(没有依赖任何中间件)。Powerful dynamic thread pool, does not rely on any middleware, with monitoring thread pool function.

?? 动态线程池系统,包含 Server 端及 SpringBoot Client 端需引入的 Starter. 动态线程池监控,主意来源于美团技术公众号 点击查看美团线程池文章 看了文章后深受感触,再加上最近线上线程池的不可控以及不可逆等问题,想做出一个 兼容性、功能性、易上手等特性 集于一身的的

龙台 3.4k Jan 3, 2023
Text Object Java Objects (TOJOs): an object representation of a multi-line structured text file like CSV

It's a simple manager of "records" in a text file of CSV, JSON, etc. format. It's something you would use when you don't want to run a full database,

Yegor Bugayenko 19 Dec 27, 2022
FlexyPool adds metrics and failover strategies to a given Connection Pool, allowing it to resize on demand.

Introduction The FlexyPool library adds metrics and flexible strategies to a given Connection Pool, allowing it to resize on demand. This is very hand

Vlad Mihalcea 970 Jan 1, 2023
光 HikariCP・A solid, high-performance, JDBC connection pool at last.

HikariCP It's Faster.Hi·ka·ri [hi·ka·'lē] (Origin: Japanese): light; ray. Fast, simple, reliable. HikariCP is a "zero-overhead" production ready JDBC

Brett Wooldridge 17.7k Jan 1, 2023
Vibur DBCP - concurrent and dynamic JDBC connection pool

Vibur DBCP is concurrent, fast, and fully-featured JDBC connection pool, which provides advanced performance monitoring capabilities, including slow S

Vibur 94 Apr 20, 2022
🔥 强大的动态线程池,并附带监控报警功能(没有依赖中间件),完全遵循阿里巴巴编码规范。Powerful dynamic thread pool, does not rely on any middleware, with monitoring and alarm function.

?? 动态线程池(DTP)系统,包含 Server 端及 SpringBoot Client 端需引入的 Starter. 这个项目做什么? 动态线程池(Dynamic-ThreadPool),下面简称 DTP 系统 美团线程池文章 介绍中,因为业务对线程池参数没有合理配置,触发过几起生产事故,进而

longtai 3.4k Dec 30, 2022
Connection Pool Test Setup

Connection Pool Test Setup Setup to test the behavior of http connection pools with the following setup server-apache apache server with proxy-pass to

Johannes Wendig 1 Jan 21, 2022
Users can create and sign up for giveaways which, upon expiring, will select a random winner from the pool of entries

PROJECT NAME Readaway Project Description Users can create and sign up for giveaways which, upon expiring, will select a random winner from the pool o

null 2 Apr 4, 2022
Objenesis is a library dedicated to bypass the constructor when creating an object. On any JVM there is.

Objenesis Objenesis is a library dedicated to bypass the constructor when creating an object. On any JVM there is. You can find the website and user d

EasyMock 532 Jan 2, 2023
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

null 1.5k Jan 4, 2023
Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper

Simple Flat Mapper Release Notes Getting Started Docs Building it The build is using Maven. git clone https://github.com/arnaudroger/SimpleFlatMapper.

Arnaud Roger 418 Dec 17, 2022
dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

dOOv 77 Nov 20, 2022