Skip to main content
Improved Formatting
Source Link
Quill
  • 12.1k
  • 5
  • 41
  • 94

According to what I haveI've read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

gcc -std=gnu99 -O3 {file}.c {bin-name}

gcc -std=gnu99 -O3 {file}.c {bin-name}

I use htophtop + perfperf to measure performance.

According to what I have read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

gcc -std=gnu99 -O3 {file}.c {bin-name}

I use htop + perf to measure performance.

According to what I've read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

gcc -std=gnu99 -O3 {file}.c {bin-name}

I use htop + perf to measure performance.

deleted 53 characters in body; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

My non Non-blocking Unix domain socket shows bad performance

I've developed quickly two kinds of socket use,: the first with blocking mode, and the second with non-blocking mode. The sockets are Unix domain sockets. My My problem is that the kernel consume a huge amount of CPU (approx: 85 %). My goal is to minimize the KERNEL CPU usage and to increase the THROUGHPUT My goal is to minimize the kernel CPU usage and to increase the throughput.

The blocking mode unixUnix socket shows performances of approx 1.3 GB/s The. The non-blocking mode unixUnix socket shows performances of approx 170 MB/s.

The blocking version is faster than the non-blocking (+ epoll) version by approximately 8 ×.

The code of the blockingBlocking version is as follow:

client.cclient.c

server.cserver.c

The code of the nonNon-blocking version is:

client.cclient.c

server.cserver.c

According to what I have read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance? Why am I observing the reverse performance?

  • Is there a way to increase the throughput more than 1.3 GB/s?
  • Is there a way to minimize the KERNELkernel CPU usage?

NB:

Programs were compiled using:

Programs were compiled using: gcc -std=gnu99 -O3 {file}.c {bin-name}

gcc -std=gnu99 -O3 {file}.c {bin-name}

My non-blocking Unix domain socket shows bad performance

I've developed quickly two kinds of socket use, the first with blocking mode, the second with non-blocking mode. The sockets are Unix domain sockets. My problem is that the kernel consume a huge amount of CPU (approx: 85 %). My goal is to minimize the KERNEL CPU usage and to increase the THROUGHPUT

The blocking mode unix socket shows performances of approx 1.3 GB/s The non-blocking mode unix socket shows performances of approx 170 MB/s.

The blocking version is faster than the non-blocking (+ epoll) version by approximately 8 ×.

The code of the blocking version is as follow:

client.c

server.c

The code of the non-blocking version is

client.c

server.c

According to what I have read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

  • Is there a way to increase the throughput more than 1.3 GB/s?
  • Is there a way to minimize the KERNEL CPU usage?

NB:

Programs were compiled using: gcc -std=gnu99 -O3 {file}.c {bin-name}

Non-blocking Unix domain socket

I've developed quickly two kinds of socket use: the first with blocking mode and the second with non-blocking mode. The sockets are Unix domain sockets. My problem is that the kernel consume a huge amount of CPU (approx: 85 %). My goal is to minimize the kernel CPU usage and to increase the throughput.

The blocking mode Unix socket shows performances of approx 1.3 GB/s. The non-blocking mode Unix socket shows performances of approx 170 MB/s.

The blocking version is faster than the non-blocking (+ epoll) version by approximately .

Blocking version:

client.c

server.c

Non-blocking version:

client.c

server.c

According to what I have read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

  • Is there a way to increase the throughput more than 1.3 GB/s?
  • Is there a way to minimize the kernel CPU usage?

Programs were compiled using:

gcc -std=gnu99 -O3 {file}.c {bin-name}

deleted 14 characters in body; edited tags; edited tags
Source Link
200_success
  • 145.6k
  • 22
  • 191
  • 481

my My non-blocking unixUnix domain socket application shows bad performancesperformance

I use tasksettaskset command to affect each process to a particular CPU core.

The Blocking modeblocking mode unix socket shows performances of approx 1.3 GB/s1.3 GB/s The Non-blockingnon-blocking mode unix socket shows performances of approx 170 MB/s170 MB/s.

The blocking versionblocking version is fasterfaster than the non-blocking non-blocking (+ epoll)(+ epoll) version 8 times approxby approximately 8 ×.

The code of the Blockingblocking version is as follow:

According to what I think that Nonhave read on the Internet, non-blocking mode is veryshould be faster than the blocking mode as discussed into the internet, . Why i haveam I observing the reverse performancesperformance?

  • Is there a way to increase the throughput more than 1.3 GB/s?
  • Is there a way to minimize the KERNEL CPU usage?

NB:

Is there a way to increase the throughput more than 1.3 GB/s? Programs were compiled using: Is there a way to minimize the KERNEL CPU usage?gcc -std=gnu99 -O3 {file}.c {bin-name}

NB: programs were compiled using: gcc -std=gnu99 -O3 {file}.c {bin-name} I I use htop + perf to have performancesmeasure performance.

my non-blocking unix domain socket application shows bad performances

I use taskset command to affect each process to a particular CPU core.

The Blocking mode unix socket shows performances of approx 1.3 GB/s The Non-blocking mode unix socket shows performances of approx 170 MB/s

The blocking version is faster than the non-blocking (+ epoll) version 8 times approx

The code of the Blocking version is as follow:

I think that Non-blocking mode is very faster than the blocking mode as discussed into the internet, Why i have the reverse performances?

Is there a way to increase the throughput more than 1.3 GB/s? Is there a way to minimize the KERNEL CPU usage?

NB: programs were compiled using: gcc -std=gnu99 -O3 {file}.c {bin-name} I use htop + perf to have performances

My non-blocking Unix domain socket shows bad performance

I use taskset command to affect each process to a particular CPU core.

The blocking mode unix socket shows performances of approx 1.3 GB/s The non-blocking mode unix socket shows performances of approx 170 MB/s.

The blocking version is faster than the non-blocking (+ epoll) version by approximately 8 ×.

The code of the blocking version is as follow:

According to what I have read on the Internet, non-blocking mode should be faster than blocking mode. Why am I observing the reverse performance?

  • Is there a way to increase the throughput more than 1.3 GB/s?
  • Is there a way to minimize the KERNEL CPU usage?

NB:

Programs were compiled using: gcc -std=gnu99 -O3 {file}.c {bin-name}

I use htop + perf to measure performance.

Source Link
elhadi
  • 157
  • 1
  • 1
  • 3
Loading