which flags should I pass to V8?

37 views
Skip to first unread message

Chunhui Li

unread,
Jun 26, 2019, 11:32:54 PM6/26/19
to v8-dev
 I'm using embedded v8 in my server. Each isolate will be about 40M, and there will be 100 isolates at the same time. What should I pass to V8 with --max-semi-space-size and/or --max-old-space-size?

Yang Guo

unread,
Jun 27, 2019, 3:40:34 AM6/27/19
to v8-...@googlegroups.com, Ulan Degenbaev, Hannes Payer
Adding the right folks. 

On Thu, Jun 27, 2019, 05:32 Chunhui Li <lichun...@bytedance.com> wrote:
 I'm using embedded v8 in my server. Each isolate will be about 40M, and there will be 100 isolates at the same time. What should I pass to V8 with --max-semi-space-size and/or --max-old-space-size?

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/dd329607-fc77-4356-83a3-be458e3ca18c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chunhui Li

unread,
Jun 27, 2019, 3:47:03 AM6/27/19
to v8-dev
Adding one another condition, as time goes on, some of the isolates will be disposed and some other new isolates will be created. 

Jakob Kummerow

unread,
Jun 27, 2019, 6:08:36 AM6/27/19
to v8-...@googlegroups.com
The first thing to try is always not to pass any special flags. Does that run into any issues?

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.

Ulan Degenbaev

unread,
Jun 27, 2019, 6:21:31 AM6/27/19
to v8-dev
--max-semi-space-size=1 --max-old-space-size=37 would keep the heap size at around 40.

FYI, I am adding a new flag --max-heap-size that will be available in future versions of V8: https://chromium-review.googlesource.com/c/v8/v8/+/1679500

Ulan Degenbaev

unread,
Jun 27, 2019, 6:27:30 AM6/27/19
to v8-dev
Clarification: if 40MB is the expected size of live objects, then you probably want to have some free space in heap to avoid GC storm.
So --max-semi-space-size=1 --max-old-space-size=80 might be better in that case.

Chunhui Li

unread,
Jun 27, 2019, 6:29:53 AM6/27/19
to v8-...@googlegroups.com
My question is whether this setting is the limitation of one isolate? Or is it a global setting?

Ulan Degenbaev

unread,
Jun 27, 2019, 6:36:25 AM6/27/19
to v8-dev
The flag is per isolate

Chunhui Li

unread,
Jun 27, 2019, 10:51:55 AM6/27/19
to v8-...@googlegroups.com
Why is it enough to set semi-space-size to 1?

Reply all
Reply to author
Forward
0 new messages