jedis - redis存取数据很慢怎么办?
phpcn_u1582
phpcn_u1582 2017-04-25 09:03:04
0
1
782

我用jedis操作redis数据库, 一秒钟只能get或set 100个key左右。

JedisPool jedisPool = new JedisPool(poolConfig, "192.168.3.111"); Jedis jedis = jedisPool.getResource(); for(int i=0;i<999999;i++) { System.out.println(i); jedis.set("1","1"); }

客户端分片之后速率也差不多, 有什么解决方案吗?(不使用pipeline)

phpcn_u1582
phpcn_u1582

reply all (1)
Ty80

It’s not that redis is slow, it’s that you’re waiting for network io for multiple synchronizations.

Consider using mget and mset

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!