Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51869

Re: Python performance

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'question.': 0.14; '"it\'s': 0.16; 'erlang.': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'language?': 0.16; 'mean,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'twisted': 0.16; 'wayne': 0.16; 'wrote:': 0.18; 'stefan': 0.19; 'programming': 0.22; '(in': 0.22; 'aug': 0.22; 'load': 0.23; 'header:User-Agent:1': 0.23; "haven't": 0.24; 'script': 0.25; 'second': 0.26; 'least': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'generally': 0.29; 'possibility': 0.29; "i'm": 0.30; '(which': 0.31; 'url:wiki': 0.31; 'ok.': 0.31; 'quite': 0.32; 'fri,': 0.33; 'problem': 0.35; "can't": 0.35; 'received:84': 0.35; 'but': 0.35; 'there': 0.35; 'done': 0.36; 'should': 0.36; 'two': 0.37; 'handle': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'expect': 0.39; 'does': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'either': 0.39; 'received:org': 0.40; 'most': 0.60; 'course': 0.61; 'day.': 0.63; '2000': 0.65; 'offer,': 0.65; 'hour': 0.70; 'day': 0.76; 'hand.': 0.84; 'received:arcor-ip.net': 0.84; 'received:pools.arcor- ip.net': 0.84; 'url:trac': 0.84; 'mails': 0.89; '2013,': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: Python performance
Date Sat, 03 Aug 2013 19:04:17 +0200
References <51FB9F49.9040209@globe.de> <alpine.DEB.2.02.1308030807050.2301@gilgamesh>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host dslb-084-056-004-084.pools.arcor-ip.net
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7
In-Reply-To <alpine.DEB.2.02.1308030807050.2301@gilgamesh>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.163.1375549469.1251.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1375549469 news.xs4all.nl 15888 [2001:888:2000:d::a6]:48428
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51869

Show key headers only | View raw


Wayne Werner, 03.08.2013 15:09:
> On Fri, 2 Aug 2013, Schneider wrote:
>> I have to write a small SMTP-Relay script (+ some statistic infos) and
>> I'm wondering, if this
>> can be done in python (in terms of performance, of course not in terms of
>> possibility ;) ).
>>
>> It has to handle around 2000 mails per hour for at least 8hours a day
>> (which does not mean, that it is allowed not to respond the rest of 
> the day.
>>
>> Can this be done? or should I better use some other programming language?
>> My second choice would be erlang.
> 
> Check out Kenneth Rietz's inbox.py[1]
> 
> "It's quite quick. One instance should handle over one thousand emails per
> second."

Well, this has little to do with Kenneth Reitz. The smtpd implementation is
part of the stdlib in Python. It uses asyncore and asynchat to scale, so
you can generally expect it to be fast enough for the load in question.
Working with asyncore and asynchat isn't the most pleasant that Python can
offer, but given that it's there and has been for years, it should be
pretty ok.

Alternatively, Twisted also has a server+client implementation of SMTP:

https://twistedmatrix.com/trac/wiki/TwistedMail

Haven't used either of the two yet, though, so I can't say which is a
better start for the problem at hand.

Stefan

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python performance Stefan Behnel <stefan_ml@behnel.de> - 2013-08-03 19:04 +0200

csiph-web