Answer the question
In order to leave comments, you need to log in
Is it possible to increase JNA throughput?
There is a sish method that gives an array of structures (about 6000 at a time, ~ 1kb each), the toad pulls it in several threads. as a result, approximately 3 Gb of data from C++ should come to the toad. Why is less than 1 Gbit coming. Changing the number of threads in toad does not give an improvement, just like changing the burst size in c++, the queue continues to grow at about the same rate. It seems that there is simply not enough bandwidth
for (int i = 0; i < 6; i++) {
new Thread(() -> {
while (true) {
StructContainer container = cLib.get();
if (container == null || container.size <= 0) {
continue;
}
}
}).start();
struct PacketArray getPacket() {
struct PacketArray packetArray;
if (!queue.try_dequeue(packetArray)) {
packetArray.size = 0;
}
return packetArray;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question