Is iocage release-11.1 jail thread safe?

Status
Not open for further replies.

orjan-

Dabbler
Joined
Apr 17, 2018
Messages
20
I'm running freenas-11.1U4 and I'm setting up a jail in iocage with release-11.1 that will run nextcloud using apache-2.4 and mod-php7.1 using the http2 protocol. I'm trying to figure out the best apache-mpm worker for this jail. The apache documentation says that a unix system like BSD should use one of these 3 mpm workers: prefork, worker, or event, and which one depends on if it's thread-safe and what the answer to these two questions below is.
Can anyone help me out with the answer to the questions below?

1. Does the system support threads?

2. Does the system support thread-safe polling (Specifically, the kqueue and epoll functions)?
 
D

dlavigne

Guest
Did you find the answer to your questions? If not, did you try asking on the FreeBSD forums?
 

millst

Contributor
Joined
Feb 2, 2015
Messages
141
1. Of course, a jail wouldn't be of much use these days without threads.
2. BSD uses kqueue, not epoll.

-tm
 

orjan-

Dabbler
Joined
Apr 17, 2018
Messages
20
I did not find the answer to the questions above before they where answered a few minutes ago. I did however find non-system specific discussions about running apache with the mpm-event module together with php. It seems that apache handles threads very well, however php does not. Also, most of the php packages in package systems seems to be built without support for threads. Some of the modules in php does not support threads either, and i think some of those modules are needed for nextcloud. Nextcloud recommends running php as mod_php over php-fpm for performance, so it's basically a question about using apache with mpm-prefork and mod_php, or using apache with mpm-event and then run php as php-fpm as php can then run without support for threads while apache support it.
I don't know which of those two setups would perform best, so i just ended up using apache with the mpm-prefork together with mod_php.
 

millst

Contributor
Joined
Feb 2, 2015
Messages
141
If you only have a handful of users, it probably makes zero significant difference for performance.

-tm
 
Status
Not open for further replies.
Top