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.


[v8-users] Lazy deserialization

2018-02-15 Thread Chris Dumoulin
I'm interested in minimizing v8 memory usage, and I recently saw this blog 
post on Lazy 
Deserialization: https://v8project.blogspot.ca/2018/02/lazy-deserialization.html

I've built and run samples/hello-world.cc against static libraries built 
from v6.3 and v6.5, and measured the memory usage using Valgrind's Massif 
tool.
I expect to see a reduction in memory usage with v6.5 (due to the lazy 
deserialization), but I don't. Is there something I need to do in the code 
to enable the lazy deserialization?

Thanks,
Chris

-- 
-- 
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: [blink-dev] Re: [v8-users] Intent to ship: String.prototype.trimStart / String.prototype.trimEnd

2018-02-15 Thread 'Mathias Bynens' via v8-users
For future reference: this landed

in V8 v6.6.253 and should thus be available in Chrome 66.


On Fri, Feb 9, 2018 at 11:44 PM, Adam Klein  wrote:

> LGTM3!
>
> On Fri, Feb 9, 2018 at 12:52 PM, Sathya Gunasekaran 
> wrote:
>
>> LGTM
>>
>> On Fri, Feb 9, 2018 at 8:36 AM, Benedikt Meurer 
>> wrote:
>>
>>> LGTM
>>>
>>>
>>> Mathias Bynens  schrieb am Fr., 9. Feb. 2018,
>>> 16:36:
>>>
 Contact emails math...@chromium.org Spec https://github.com/tc39/propos
 al-string-left-right-trim Summary Until now,
 String.prototype.{trimLeft,trimRight} were non-standard language
 extensions, required for Web compatibility. The Stage 3 proposal at
 https://github.com/tc39/proposal-string-left-right-trim standardizes
 this functionality as String.prototype.{trimStart,trimEnd}, and
 defines String.prototype.{trimLeft,trimRight} as aliases for backwards
 compatibility. Vendor signals Firefox: Public support Edge: Public
 support Safari: In development Web developers: Positive Compatibility
 risk
 There could be a compatibility risk, but that seems unlikely. We won’t
 know for sure until we try shipping it. Ongoing technical constraints
 None Will this feature be supported on all six Blink platforms
 (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
 Yes
 Tracking bug
 https://bugs.chromium.org/p/v8/issues/detail?id=6530 Link to entry on
 the Chrome Platform Status https://www.chromestatus.com/f
 eatures/479006651936 Requesting approval to ship? Yes

 Note that since this is a V8/JS feature, this post is just an FYI to
 blink-dev — no signoff from Blink API owners is required.

 --
 --
 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.

>>> --
>>>
>>>
>>>
>>> * •  *
>>> *Benedikt Meurer** •  **Google Germany GmbH*
>>> * •  *Erika-Mann-Str. 33
>>> 
>>> * •
>>> *80636
>>> Munich
>>> 
>>>
>>>  •
>>> 
>>> bmeu...@google.com
>>>
>>>
>>> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
>>>
>>> Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft:
>>> Hamburg
>>>
>>> Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
>>> leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
>>> löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is
>>> confidential. If you are not the right addressee please do not forward it,
>>> please inform the sender, and please erase this e-mail including any
>>> attachments. Thanks.
>>>
>>> --
>>> --
>>> 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.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "blink-dev" group.
> To unsubscribe