* commit '556c9c245de257efe8bda09ff23d2c4f7add5e49': set /proc/sys/net/unix/max_dgram_qlen to large value
This commit is contained in:
commit
00eaae3aaa
4 changed files with 9 additions and 2 deletions
|
@ -38,6 +38,7 @@ public:
|
|||
|
||||
virtual ~SocketListener();
|
||||
int startListener();
|
||||
int startListener(int backlog);
|
||||
int stopListener();
|
||||
|
||||
void sendBroadcast(int code, const char *msg, bool addErrno);
|
||||
|
|
|
@ -70,6 +70,10 @@ SocketListener::~SocketListener() {
|
|||
}
|
||||
|
||||
int SocketListener::startListener() {
|
||||
return startListener(4);
|
||||
}
|
||||
|
||||
int SocketListener::startListener(int backlog) {
|
||||
|
||||
if (!mSocketName && mSock == -1) {
|
||||
SLOGE("Failed to start unbound listener");
|
||||
|
@ -84,7 +88,7 @@ int SocketListener::startListener() {
|
|||
SLOGV("got mSock = %d for %s", mSock, mSocketName);
|
||||
}
|
||||
|
||||
if (mListen && listen(mSock, 4) < 0) {
|
||||
if (mListen && listen(mSock, backlog) < 0) {
|
||||
SLOGE("Unable to listen on socket (%s)", strerror(errno));
|
||||
return -1;
|
||||
} else if (!mListen)
|
||||
|
|
|
@ -105,7 +105,8 @@ int main() {
|
|||
// and LogReader is notified to send updates to connected clients.
|
||||
|
||||
LogListener *swl = new LogListener(logBuf, reader);
|
||||
if (swl->startListener()) {
|
||||
// Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value
|
||||
if (swl->startListener(300)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ loglevel 3
|
|||
write /proc/sys/kernel/dmesg_restrict 1
|
||||
write /proc/sys/vm/mmap_min_addr 32768
|
||||
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
|
||||
write /proc/sys/net/unix/max_dgram_qlen 300
|
||||
write /proc/sys/kernel/sched_rt_runtime_us 950000
|
||||
write /proc/sys/kernel/sched_rt_period_us 1000000
|
||||
|
||||
|
|
Loading…
Reference in a new issue