[HipHop] Porting wikidiff2 to hhvm

Sean Cannella seanc at fb.com
Mon Mar 31 15:22:40 UTC 2014


I was on holiday so I¹m not sure if anyone ever replied to this so I¹m
going to even if it¹s a bit late.

HPHP::String allocated normally is per-request so we know which request(s)
are behaving badly, and like php5 we do have a request OOM limit.

We don¹t have any extension specific pools at the moment. It¹s something
that comes up periodically, more for tracking purposes (so we know who to
blame for swapdeath) than anything else but most of the tracking
approaches we¹re discussing would achieve this in other way besides pools.

Thanks,
Sean Cannella | Eng | HipHop / Site Builders | NYC 08.H.19A
If you are smart and persistent, you may find the truth. It is not always
a reward.




On 3/8/14, 7:22 AM, "Max Semenik" <maxsem.wiki at gmail.com> wrote:

>On 08.03.2014, 1:37 Drew wrote:
>
>> Max,
>
>> Can you point me to the code sample where you a String is growing
>> indefinitely? Is it PHP code, or is it extension code? What specific API
>> is being used to grow the string?
>
>> Obviously we want to protect programmers from shooting themselves in the
>> foot, but at the same time we don't want to have unreasonably low limits
>> that prevent programmers from working with large strings. Having more
>> context would help with figuring out what the right course of action is.
>
>PHP:
>str_repeat( 1000000000000000, 'x' );
>
>C++:
>std::string x("x", 10000000);
>HPHP::String s;
>while(1) s += x;
>
>We at Wikipedia sometimes encounter some situations where some
>operations hit PHP's memory_limit which is currently at 200M -
>usually due to parsing some large pages where users push wikitext to
>extreme:) Wonder how things would look without sandboxing - will it be
>easier to send servers to swapdeath?
>
>Anyway, my question was whether my extension code should stick to
>stock C/STL memory management or there is something HHVM-specific.
>
>-- 
>Best regards,
>  Max Semenik ([[User:MaxSem]])
>
>
>_______________________________________________
>HipHop mailing list
>HipHop at lists.wikimedia.org
>https://urldefense.proofpoint.com/v1/url?u=https://lists.wikimedia.org/mai
>lman/listinfo/hiphop&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=qWKZgeMOTEjZO3swt
>NEHLw%3D%3D%0A&m=Ot3fpf62PFKhniwa3%2FXu6NlkhhWjbqu7FYQtieoLlus%3D%0A&s=a03
>e8c8854fd390bc8d3f56081a100bda03e68bf0a6efebe772ae97f085f0a5d




More information about the HipHop mailing list