[erlang-questions] Erlang VM will open all socket in every thread?

linbo liao llbgurs@REDACTED
Tue Dec 15 12:25:21 CET 2015

Thanks Lukas.

So this is not the reason why proc_inode_cache consume high memory ?


2015-12-15 18:06 GMT+08:00 Lukas Larsson <lukas@REDACTED>:

> Hello,
> On Tue, Dec 15, 2015 at 9:51 AM, linbo liao <llbgurs@REDACTED> wrote:
>> If application operate a socket, will it be opened in every Erlang VM
>> thread?
> Reading about task in the manual page for proc(5)
> http://man7.org/linux/man-pages/man5/proc.5.html
>     For attributes that are shared by all threads, the con‐
>     tents  for each of the files under the task/[tid] subdirectories
>     will be the same as in the  corresponding  file  in  the  parent
>     /proc/[pid]  directory (e.g., in a multithreaded process, all of
>     the task/[tid]/cwd  files  will  have  the  same  value  as  the
>     /proc/[pid]/cwd  file  in the parent directory, since all of the
>     threads in a process share a working directory).
> The fds is another example of a resource that is shared across tasks so
> all of them will be duplicated in procfs. The reason you are seeing
> different values for different tasks is most likely because your
> application is opening new sockets while you are running the commands.
> Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151215/504a84e6/attachment.htm>

More information about the erlang-questions mailing list