Re: [v8-users] Tuning v8 settings for short-lived process

2018-02-15 Thread 'Ali Sheikh' via v8-users
One thing that might help is a custom Node.js startup snapshot. This is
being proposed here: https://github.com/nodejs/node/issues/17058, and
requires a fair amount of effort to get off the ground. But it could be
used to get significant startup performance improvements in cases like you
mention.

On Thu, Feb 15, 2018 at 2:33 PM Jakob Kummerow 
wrote:

> My intuition is that no flags will provide significant performance gains.
> The flags controlling the garbage collector are quite carefully tuned and
> probably best left alone.
>
> If most (of the possibly-avoidable) time is spent parsing and loading,
> then garbage collection probably doesn't have much influence. You could try
> to profile your process to figure out where most time is spent, maybe that
> can identify areas for optimization. See
> https://github.com/v8/v8/wiki/V8-Profiler for detailed instructions.
>
> Unfortunately there is no magic --run-twice-as-fast flag -- if we had
> one, we would turn it on by default :-)
>
>
> On Thu, Feb 15, 2018 at 12:52 PM Kevin Burke  wrote:
>
>> Hi there,
>> I have a short lived v8 process - a Node.js test suite that takes 10
>> seconds to run. It spends about half of its time loading Javascript in
>> require() blocks. Obviously one way to cut down on the startup time is to
>> cut down on the number of things that need to be loaded; I am working on
>> that.
>>
>> Do you have any intuition of whether tuning v8 options from the defaults
>> provided by Node.js will be able to achieve significant performance gains?
>> If so, which should I try to play around with? I have been doing some
>> reading but - and I would love to be shown wrong here - it doesn't seem
>> like the Node community is too too familiar with e.g. tweaking the
>> "semi_space_growth_factor" to get good performance. I'm not a GC expert
>> myself, unfortunately.
>>
>> Using default options and profiling using GNU Time, the process uses ~210
>> MB in ten seconds, 131% and has 80,000 page faults. It would be OK if it
>> used up to 1.5GB of RAM. We typically run on Macs, but any intuition about
>> useful v8 options would be helpful.
>>
>> Thanks,
>> Kevin
>>
>> --
>> --
>> v8-users mailing list
>> v8-users@googlegroups.com
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to v8-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Tuning v8 settings for short-lived process

2018-02-15 Thread Jakob Kummerow
My intuition is that no flags will provide significant performance gains.
The flags controlling the garbage collector are quite carefully tuned and
probably best left alone.

If most (of the possibly-avoidable) time is spent parsing and loading, then
garbage collection probably doesn't have much influence. You could try to
profile your process to figure out where most time is spent, maybe that can
identify areas for optimization. See
https://github.com/v8/v8/wiki/V8-Profiler for detailed instructions.

Unfortunately there is no magic --run-twice-as-fast flag -- if we had one,
we would turn it on by default :-)


On Thu, Feb 15, 2018 at 12:52 PM Kevin Burke  wrote:

> Hi there,
> I have a short lived v8 process - a Node.js test suite that takes 10
> seconds to run. It spends about half of its time loading Javascript in
> require() blocks. Obviously one way to cut down on the startup time is to
> cut down on the number of things that need to be loaded; I am working on
> that.
>
> Do you have any intuition of whether tuning v8 options from the defaults
> provided by Node.js will be able to achieve significant performance gains?
> If so, which should I try to play around with? I have been doing some
> reading but - and I would love to be shown wrong here - it doesn't seem
> like the Node community is too too familiar with e.g. tweaking the
> "semi_space_growth_factor" to get good performance. I'm not a GC expert
> myself, unfortunately.
>
> Using default options and profiling using GNU Time, the process uses ~210
> MB in ten seconds, 131% and has 80,000 page faults. It would be OK if it
> used up to 1.5GB of RAM. We typically run on Macs, but any intuition about
> useful v8 options would be helpful.
>
> Thanks,
> Kevin
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Tuning v8 settings for short-lived process

2018-02-15 Thread Kevin Burke
Hi there,
I have a short lived v8 process - a Node.js test suite that takes 10 
seconds to run. It spends about half of its time loading Javascript in 
require() blocks. Obviously one way to cut down on the startup time is to 
cut down on the number of things that need to be loaded; I am working on 
that.

Do you have any intuition of whether tuning v8 options from the defaults 
provided by Node.js will be able to achieve significant performance gains? 
If so, which should I try to play around with? I have been doing some 
reading but - and I would love to be shown wrong here - it doesn't seem 
like the Node community is too too familiar with e.g. tweaking the 
"semi_space_growth_factor" to get good performance. I'm not a GC expert 
myself, unfortunately.

Using default options and profiling using GNU Time, the process uses ~210 
MB in ten seconds, 131% and has 80,000 page faults. It would be OK if it 
used up to 1.5GB of RAM. We typically run on Macs, but any intuition about 
useful v8 options would be helpful.

Thanks,
Kevin

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.