java - Why does the execution of this code occasionally reach 50~100ms?
黄舟
黄舟 2017-07-03 11:43:18
0
1
776
    for(Map.Entry<String, String> entry : map.entrySet()) { //map 最多2个key-value对
        Request request = new Request();

        ClientInfo clientInfo = new ClientInfo(clientid, host, ip);

        String value = entry.getValue();
        RealInfo realInfo = new RealInfo(clientId, value , clientInfo);
        request.realInfo = realInfo ;

        concurrentLinkedQueue.add(request);
    }
}

jre is a 1.7 environment, and 1.6 is used for compilation.
Looking at the monitoring, most of them return within 0~1ms, but some of them return within 50~100ms, and the qps is about 800.
Now we have ruled out CPU load, memory, network card and other reasons
I really can’t figure out why it can reach 50ms. . . Please help me analyze it

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
学霸

It may be a problem with the database connection. After the IP parameter is changed, will there be any processing in the database to cause this delay? I have encountered similar problems before, but later found out that it is a problem with the database

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!