Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-19-2008, 07:50 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
AF_LOCAL domain socket versus AF_INET socket performance

For interprocess communication I've often relied on tcp sockets. For better or worse, they are simple to code, manage, and are pretty fast when you bombard the socket with data. To create these sockets I've used the AF_INET domain parameter passed to the ::socket() function. My form of IPC originally spanned multiple machines, but it has diminished recently to a single box. And thus my need for the full tcp protocol stack has vanished.

I've played around with local sockets before - sockets created using the AF_LOCAL domain rather than AF_INET. They are just as easy to code for as AF_INET domain sockets, and it looks like they would be a good choice for IPC.

But before I do the work, a question remains: If I am sending data across a AF_LOCAL socket, am I letting the kernel off the hook and (thus) removing the tcp protocol stack traversal the kernel would perform for an AF_INET domain socket? In other words, will a AF_LOCAL socket be (significantly?) faster than AF_INET sockets when sending large volumes of data between local processes?

Many thanks!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fseek on a socket descriptor to discard socket buffer? Thinking Programming 1 12-06-2005 09:15 PM
cannot read data at server socket, though client socket sends it jacques83 Linux - Networking 0 11-15-2005 01:58 PM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 07:28 PM
poor java socket read performance bobwall Linux - Networking 0 01-21-2005 09:55 PM
if (sockfd = socket(AF_INET.....)== -1) ?? blackzone Programming 4 12-14-2004 07:46 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration