Pointers on improving Couchbase configuration

2019-08-27 04:42发布

问题:

My current configuration is shown below, connecting to a 3 node cluster which are hosted on VM’s.

 var clientConfiguration = new ClientConfiguration
                    {
                        Servers = new List<Uri>
                        {
                            new Uri("http://10.20.49.31:8091/pools"),
                             new Uri("http://10.20.49.32:8091/pools"),
                             new Uri("http://10.20.49.33:8091/pools"),
                        },
                        UseSsl = false,
                        DefaultOperationLifespan = 2000,
                        BucketConfigs = new Dictionary<string, BucketConfiguration>
                        {
                            {
                                "Features", new BucketConfiguration
                                    BucketName = "Features",
                                    UseSsl = false,
                                    Password = "",
                                    DefaultOperationLifespan = 2000
                                }
                            }
                        },
                        ConnectionPoolCreator = ConnectionPoolFactory.GetFactory<ConnectionPool<MultiplexingConnection>>(),
                        IOServiceCreator = IOServiceFactory.GetFactory<MultiplexingIOService>()
                    };
                    ClusterHelper.Initialize(clientConfiguration);
                    var cluster = ClusterHelper.Get();
                    return cluster;

I’m using ‘wrk’ tool then to test the performance and requests/sec. However, i’m only getting about 192 req/sec telling me that there is a problem somewhere. Any help appreciated.

回答1:

You do not provide much information on your test.

First, you are using wrk which is a http benchmarking tool, so you are not doing a benchmark on couchbase itself, you have all your code between. Maybe the way you insert data is slow, you can do a "set" with an array of key/value to improve the performances. I use this with easily 10K elements. The same is possible with a "get".

If you have to do a massive insert you should delete the indexes before. The power by node is important too, you should have 2cores and 5go by node at least if you are hoping for some achievements.

For more configurations you should go here docker hub. I do not tell you to use Docker, just to read the documentation.