[Openstack] [Swift] Warning when running Swift on PyPy

John Dickinson me at not.mn
Thu May 5 21:54:21 UTC 2016


That's an interesting error, and a little different than what I had seen in my tests. I'd be really interested in your experience with patching eventlet (directly or monkey-patching from swift) to add those methods.


--John






On 5 May 2016, at 13:01, Shrinand Javadekar wrote:

> Hi,
>
> Based on the "Doubling Performance in Swift with No Code Changes" talk
> at the Openstack Summit, I decided to give running Swift on PyPy a
> shot. I configured a VM with Swift (largely based on the steps
> mentioned in [1], although I did have to change a few things). Swift
> was up and running. The /info endpoint showed the correct output.
>
> However, when I tried to do a simple HEAD request to get all the
> containers, I got the following warning. I did export PYPY_GC_MIN=15M
> before starting the swift services.
>
> May  5 00:35:59 shri-swift-tests swift-proxy-server: STDOUT:
> /home/blah/pypy/lib-python/2.7/SocketServer.py:717:
> RefCountingWarning: 'GreenSocket' object has no _reuse/_drop
> methods#012{{#012    You make use (or a library you are using makes
> use) of the internal#012    classes '_socketobject' and '_fileobject'
> in socket.py, initializing#012    them with custom objects.  On PyPy,
> these custom objects need two#012    extra methods, _reuse() and
> _drop(), that maintain an explicit#012    reference counter.  When
> _drop() has been called as many times as#012    _reuse(), then the
> object should be freed.#012#012    Without these methods, you get the
> warning here.  This is to#012    prevent the following situation: if
> your (or the library's) code#012    relies on reference counting for
> prompt closing, then on PyPy, the#012    __del__ method will be called
> later than on CPython.  You can#012    easily end up in a situation
> where you open and close a lot of#012    (high-level) '_socketobject'
> or '_fileobject', but the (low-level)#012    custom objects will
> accumulate before their __del__ are called.#012    You quickly risk
> running out of file descriptors, for example.#012}}#012
> self.rfile.close() (txn: txae85f55c9d3d4f26b96a5-00572a956f)
>
> Any ideas how to get over this? What are the consequences of this?
>
> Thanks in advance.
> -Shri
>
> [1] https://01.org/lp/documentation/pypy-enabling-guide-openstack-swift
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160505/4b4b5b8d/attachment.sig>


More information about the Openstack mailing list