Hi,

It seems that an expensive fullcollection happens there.

To get a better understanding you should try running your applications with
V8 flags --trace-gc --trace-gc-nvp to see internal GC statistics dumped to
stdout.

You can use SetFlagsFromString API method to enable these flags
[trace-gc-nvp was introduced recently so it might be unavailable if you use
old version of V8]

--
Vyacheslav Egorov


On Wed, Jul 28, 2010 at 6:36 AM, shudong ruan <[email protected]> wrote:

> i do benchmark to v8, and find gc cost too much time:
>
>    g_ResourceConstraints.set_max_young_space_size(64*1024*1024);
>
>    g_ResourceConstraints.set_max_old_space_size(256*1024*1024);
>   SetResourceConstraints(&g_ResourceConstraints);
>
> V8::AddGCPrologueCallback(MyGCPrologueCallback);
>
> void MyGCPrologueCallback(v8::GCType type, v8::GCCallbackFlags flags)
> {
>    LOG->debug() << "MyGCPrologueCallback GCType:" << type << ",
> GCCallbackFlags:" << flags << endl;
> }
>
>
> 2010-07-28 11:54:04|17811|DEBUG|v8 HeapStatistics, total size:
> 97435424, used size:37844088, GC ing: 0
> 2010-07-28 11:54:09|17811|DEBUG|v8 HeapStatistics, total size:
> 97435424, used size:54437608, GC ing: 0
> 2010-07-28 11:54:11|17797|DEBUG|MyGCPrologueCallback GCType:1,
> GCCallbackFlags:0
> 2010-07-28 11:54:14|17811|DEBUG|v8 HeapStatistics, total size:
> 97435424, used size:41997672, GC ing: 1
> 2010-07-28 11:54:19|17811|DEBUG|v8 HeapStatistics, total size:
> 97435424, used size:60070472, GC ing: 1
> 2010-07-28 11:54:20|17797|DEBUG|MyGCPrologueCallback GCType:1,
> GCCallbackFlags:0
> 2010-07-28 11:54:24|17811|DEBUG|v8 HeapStatistics, total size:
> 103450112, used size:53090768, GC ing: 1
> 2010-07-28 11:54:29|17811|DEBUG|v8 HeapStatistics, total size:
> 103450112, used size:68901728, GC ing: 1
> 2010-07-28 11:54:29|17797|DEBUG|MyGCPrologueCallback GCType:1,
> GCCallbackFlags:0
> 2010-07-28 11:54:34|17811|DEBUG|v8 HeapStatistics, total size:
> 107260832, used size:58538288, GC ing: 1
> 2010-07-28 11:54:39|17797|DEBUG|MyGCPrologueCallback GCType:2,
> GCCallbackFlags:0
> 2010-07-28 11:54:39|17811|DEBUG|v8 HeapStatistics, total size:
> 107260832, used size:73159064, GC ing: 1
> 2010-07-28 11:54:44|17811|DEBUG|v8 HeapStatistics, total size:
> 110124320, used size:46907488, GC ing: 1
> 2010-07-28 11:54:49|17811|DEBUG|v8 HeapStatistics, total size:
> 110377280, used size:60930112, GC ing: 1
> 2010-07-28 11:54:53|17797|DEBUG|MyGCPrologueCallback GCType:1,
> GCCallbackFlags:0
> 2010-07-28 11:54:54|17811|DEBUG|v8 HeapStatistics, total size:
> 110377280, used size:48738144, GC ing: 1
> 2010-07-28 11:54:59|17811|DEBUG|v8 HeapStatistics, total size:
> 110377280, used size:65532400, GC ing: 1
>
>
> every some time, gc cost too much time, and can't do nothing else,
> why?
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to