ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Илья Курдюков" <ilyakurdyukov@basealt.ru>
To: devel@lists.altlinux.org
Subject: [devel]  [Erlang] ограничение на количество потоков в Альте
Date: Sat, 20 Nov 2021 19:07:09 +0700
Message-ID: <97dfb53d-ed5d-3c8f-dbcf-d427646b9889@basealt.ru> (raw)
In-Reply-To: <20211120115307.GA27513@altlinux.org>

Почему в нормальных системах этот код возвращает 10000 с плюсом, а в 
Альте 500 с чем-то?

$ cat threadlim.c
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>

static void* test(void *data) { while(1) sleep(1); return NULL; }

int main() {
     int i, err = 0;
     pthread_t t;
     for (i = 0; !err && i < 100000; i++)
       err = pthread_create(&t, NULL, test, NULL);
     printf("i = %d, err = %d\n", i, err);
     exit(0);
}
$ cc -O2 -pthread threadlim.c && ./a.out
i = 507, err = 11

ulimit -u стоит по умолчанию на 512 и не даёт поставить выше 1000:

$ ulimit -u
512
$ ulimit -u 1000
$ ulimit -u 1001
-bash: ulimit: max user processes: не удаётся изменить ограничение: 
Операция не позволена

Эти ограничения с начала времён не меняли?

http://git.altlinux.org/gears/e/erlang.git

Почему в спеке Erlang делаются костыли с уменьшением количества потоков, 
вместо того, чтобы наконец исправить устаревшие лимиты в Альте?




  reply	other threads:[~2021-11-20 12:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 11:53 ` [devel] [#290158] FAILED del=python-module-yaml Dmitry V. Levin
2021-11-20 12:07   ` Илья Курдюков [this message]
2021-11-20 12:11     ` [devel] [Erlang] ограничение на количество потоков в Альте Dmitry V. Levin
2021-11-20 12:14       ` Anton Farygin
2021-11-20 15:04         ` Nikolay A. Fetisov
2021-11-20 18:15           ` mikhailnov
2021-11-20 19:07             ` Gleb Fotengauer-Malinovskiy
2021-11-21  8:59             ` Nikolay A. Fetisov
2021-11-21 10:00               ` Dmitry V. Levin
2021-11-21 11:56                 ` Nikolay A. Fetisov
2021-11-21 12:09                   ` Dmitry V. Levin
2021-11-21 12:37                     ` Nikolay A. Fetisov
2021-11-21 12:55                       ` Dmitry V. Levin
2021-11-21 13:09                         ` Nikolay A. Fetisov
2021-11-21 12:52                 ` Alexey Gladkov
2021-11-21 13:00                   ` Dmitry V. Levin
2021-11-21 13:15                     ` Alexey Gladkov
2021-11-21 13:37                       ` Dmitry V. Levin
2021-11-21 17:46             ` Michael Shigorin
2021-11-20 16:07         ` Dmitry V. Levin
2021-11-20 17:24           ` Andrew A. Vasilyev
2021-11-20 12:46       ` Илья Курдюков

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97dfb53d-ed5d-3c8f-dbcf-d427646b9889@basealt.ru \
    --to=ilyakurdyukov@basealt.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git