Skip to content
This repository was archived by the owner on Aug 18, 2019. It is now read-only.

Performance problems #33

@Brimstedt

Description

@Brimstedt

I have some quite simple code:

        final ShardedCounterService shardedCounterService = new ShardedCounterServiceImpl();
        shardedCounterService.increment(counterName, 1);

        final Optional<Counter> optCounter = shardedCounterService.getCounter(counterName);
        BigInteger newQueueItemCount = optCounter.get().getCount();

If I do a load test on this, I get quite bad performance: spikes several seconds long, for a load of less than 20r/s.
This when I already have a bunch of instances warmed up and 10 shards for my counter.

I've tried higher shard counts, but it does not give much better result.

If I remove the "increment" line I get much better result (300ms max responsetimes for the same amount of instances, 20r/s, etc) (But of course; I dont get a working counter :)

Am I misunderstanding something gravely here? :-)
Should this not be possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions