Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52951 > unrolled thread
| Started by | vasudevram <vasudevram@gmail.com> |
|---|---|
| First post | 2013-08-24 14:48 -0700 |
| Last post | 2013-08-24 22:27 -0600 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.python
New way of writing socket servers in #Linux kernel 3.9 (and in #Python too) vasudevram <vasudevram@gmail.com> - 2013-08-24 14:48 -0700
Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too) Michael Torrie <torriem@gmail.com> - 2013-08-24 20:08 -0600
Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too) Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-08-24 21:06 -0700
Re: New way of writing socket servers in #Linux kernel 3.9 (and in #Python too) Michael Torrie <torriem@gmail.com> - 2013-08-24 22:27 -0600
| From | vasudevram <vasudevram@gmail.com> |
|---|---|
| Date | 2013-08-24 14:48 -0700 |
| Subject | New way of writing socket servers in #Linux kernel 3.9 (and in #Python too) |
| Message-ID | <e964621d-e24e-4523-a26f-91cf3fcf962c@googlegroups.com> |
This may be of interest to readers of this newsgroup: Original article: http://lnkd.in/taAFNt Content (without links): A new way of writing socket servers has been introduced with the Linux kernel 3.9. It involves the ability to bind multiple listening sockets to the same port on the same host, by unrelated processes or threads. The socket option is called SO_REUSEPORT. Article about SO_REUSEPORT. The above article includes a demo of how to use the feature in Python, using the example of a simple echo server and netcat. Another article about SO_REUSEPORT on LWN.net by Michael Kerrisk. Hacker News thread about SO_REUSEPORT. About Michael Kerrisk. He has worked at DEC (Digital Equipment Corporation) and Google in the past. Coincidentally, I happened to have come across Michael Kerrisk's Unix and Linux work some months earlier and had emailed him with a few questions about it, which he was kind enough to answer. Kerrisk is the author of the book The Linux Programming Interface, which seems like an interesting and useful book. From the web site for the The Linux Programming Interface book: [ The Linux Programming Interface (published in October 2010, No Starch Press, ISBN 978-1-59327-220-3) is a detailed guide and reference for Linux and UNIX system programming. With 1552 pages, 115 diagrams, 88 tables, nearly 200 example programs, and over 200 exercises, TLPI is the most comprehensive description of Linux and UNIX system programming available. The author, Michael Kerrisk, is the maintainer of the Linux man-pages project, which documents the Linux kernel and glibc APIs. He has long been active in the documentation, testing, and design review of Linux kernel-userspace interfaces. ] And if you want to write command-line programs in Linux using C (an area closely related to the topic of the TLPI book), you may wish to check out my article on the subject, written for IBM developerWorks: Developing a Linux command-line utility. I have not yet tried out the SO_REUSEPORT option, because I need to get Linux kernel 3.9 first, but it seems like a useful technique for increasing performance of socket servers. Note that there are various other issues involved, so you may not get increased performance just by using this option in your code. As always with performance tuning, you have to profile your code, identify hotspots, and then only work on improving certain parts of it that seem to be the bottlenecks. And in this case, even before all that, you may need to evaluate whether this socket option is relevant to your application at all. So, caveat lector :-) - Vasudev Ram - Dancing Bison Enterprises
[toc] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2013-08-24 20:08 -0600 |
| Message-ID | <mailman.205.1377396494.19984.python-list@python.org> |
| In reply to | #52951 |
#Linux, #Python? This this hash tag stuff is getting out of hand, don't you think?
[toc] | [prev] | [next] | [standalone]
| From | Benjamin Kaplan <benjamin.kaplan@case.edu> |
|---|---|
| Date | 2013-08-24 21:06 -0700 |
| Message-ID | <mailman.208.1377403587.19984.python-list@python.org> |
| In reply to | #52951 |
On Sat, Aug 24, 2013 at 7:08 PM, Michael Torrie <torriem@gmail.com> wrote: > #Linux, #Python? This this hash tag stuff is getting out of hand, don't > you think? Didn't you hear? In an effort to redefine itself for the modern Internet, Usenet is adding support for hash tags and limiting posts to 140 characters because kids these days just don't want to read anything longer.
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2013-08-24 22:27 -0600 |
| Message-ID | <mailman.209.1377404874.19984.python-list@python.org> |
| In reply to | #52951 |
On 08/24/2013 10:06 PM, Benjamin Kaplan wrote: > On Sat, Aug 24, 2013 at 7:08 PM, Michael Torrie <torriem@gmail.com> wrote: >> #Linux, #Python? This this hash tag stuff is getting out of hand, don't >> you think? > > Didn't you hear? In an effort to redefine itself for the modern > Internet, Usenet is adding support for hash tags and limiting posts to > 140 characters because kids these days just don't want to read > anything longer. Sweet. And here I thought it was irc channels.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web