Граф коммитов

163 Коммитов

Автор SHA1 Сообщение Дата
Santosh Yadawar e5d7a76047 UDP receiver: Add missing turn_on_light() for no sync mode 2021-06-10 12:24:45 -07:00
lubaihua33 95f94192d7
Add some changes to support 500K connections (#58) 2021-05-28 17:39:37 -07:00
Simon Xiao 3a2dc317dc xml log: print Bps instead of bps 2021-05-17 05:45:59 +00:00
Simon Xiao fef0567cec
Limit the per-thread metric only in verbose mode (#54) 2021-05-03 23:04:49 -07:00
Simon Xiao b3fb60d8f9
Remove the unexpected debug code (#53) 2021-05-03 22:14:49 -07:00
Simon Xiao 5c71f06945
Output raw throughput (bps) in the xml log (#52) 2021-05-03 18:53:00 -07:00
Simon Xiao fcebda4d7c
Clarify the throughput unit conversion (#51) 2021-05-03 17:55:53 -07:00
Simon Xiao 1c297cfe77
Update README to correct some links 2021-02-21 01:34:25 -08:00
SunnyGuoqq 269bc36dd5
refine the code to detect current log console (#49)
* refine the code to detect current log console

* remove unnecessary header file include
2021-02-21 00:31:54 -08:00
Simon Xiao 06030d22b5
Merge pull request #47 from sharsonia/fix_tx/rx_packet_logging
Fixing logging of tx/rx packets
2021-02-18 15:59:24 -08:00
Simon Xiao 6f9db4172f
Merge pull request #48 from lubaihua33/fix
Fix loop initial declarations
2021-02-04 09:47:10 -08:00
Baihua Lu d688424567 Fix loop initial declarations 2021-02-04 22:51:44 +08:00
Sonia Sharma 7faa048376 Fixing logging of tx/rx packets 2021-02-02 11:19:42 -08:00
Michael Friesen cbbeda0ea8
Several performance optimizations for small I/O. (#38)
* Several performance optimizations for small IO.

1. Drain TCP receives until EAGAIN (i.e. EWOULDBLOCK) rather
   than continuously polling. Limit the number of consecutive
   receives for some rudimentary fairness across connections.

2. Don't acquire a mutex in the IO loop (is_light_turned_on())
   and instead simply examine the boolean variable.

3. Use connected UDP sockets for sends (similar to Windows NTTTcp.)

4. Use send/recv rather than read/write.

A couple minor fixes to the project itself.

1. 'make clean' makes a best effort without root access.

2. Add a .gitignore.

* Revert some code shifting.

* Do not zero out receive buffer in IO loop.

* Simplify else if to else.
2021-01-21 10:15:41 -08:00
Leandro A. F. Pereira f05f0c2cf3
Do not print escape sequences to stdout if terminal isn't a TTY (#43)
When redirecting the output to a file, the real-time throughput information
will be printed with escape sequences to clear the current line.  This will
make it difficult to look at the results later and see if the throughput
changed during testing.

Print the escape sequence only if the terminal isn't a TTY, or if the $TERM
environment variable isn't set to "dumb".
2020-10-28 11:33:36 -07:00
Simon Xiao 213371f3b0
Update pr-checker.yml 2020-08-06 22:29:57 -07:00
Simon Xiao f299bc5e65
Create pr-checker.yml 2020-08-06 22:28:22 -07:00
Simon Xiao 58fa810320
Avoid depends on bin/ folder when build install with PREFIX
Fix the error if PREFIX location does not have a bin/ folder:

azureuser@LinuxBox:~/ntttcp-for-linux/src$ make install PREFIX=/home/azureuser
cp ntttcp /home/azureuser/bin/
cp: cannot create regular file '/home/azureuser/bin/': Not a directory
make: *** [Makefile:48: install] Error 1
2020-08-06 12:23:39 -07:00
Simon Xiao 500366a4b0
Merge pull request #34 from thanasisk/fix-Makefile
now properly installs under /usr/local, unless told otherwise via env variable
2020-08-04 22:41:48 -07:00
Simon Xiao 380de08257 bug fix: pin the source udp port in the correct way 2020-06-16 16:47:31 -07:00
Simon Xiao bceb216da6 Print out "RetransSegs" for TCP traffic by default
Example output:

simonxiao@sixiao-dev-1:~/ntttcp-for-linux/src# ./ntttcp -s 10.0.0.4 --show-tcp-retrans --show-nic-packets eth0
NTTTCP for Linux 1.4.0
---------------------------------------------------------
06:42:10 INFO: 64 threads created
06:42:10 INFO: 64 connections created in 5335 microseconds
06:42:10 INFO: Network activity progressing...
06:43:10 INFO: Test run completed.
06:43:10 INFO: Test cycle finished.
06:43:10 INFO: 64 connections tested
06:43:10 INFO: #####  Totals:  #####
06:43:10 INFO: test duration    :60.00 seconds
06:43:10 INFO: total bytes      :26820083712
06:43:10 INFO:   throughput     :3.58Gbps
06:43:10 INFO:   retrans segs   :78   //Print out "RetransSegs" for TCP traffic by default
06:43:10 INFO: tcp retransmit:
06:43:10 INFO:   retrans_segments/sec   :1.30
... ...
06:43:10 INFO: total packets:
06:43:10 INFO:   tx_packets     :782270
06:43:10 INFO:   rx_packets     :959732
06:43:10 INFO: cpu cores        :8
06:43:10 INFO:   cpu speed      :2394.454MHz
... ...
06:43:10 INFO:   cycles/byte    :0.97
06:43:10 INFO: cpu busy (all)   :17.37%
2020-06-15 23:50:45 -07:00
Simon Xiao 14705f1787 Several minor bug fixes
1. Add test warm-up and cool-down parameters to the XML log.
2. Add sync info in the XML log.
3. Avoid trying to sync with the receiver in the case of No-Sync.
2020-04-03 18:48:27 -07:00
Simon Xiao 4654ce90de Added a new flag '-Q' to disable real-time throughput reporting
When running this tool in test automation, users tend to write the output to a file.
In such cases, the real-time throughput is very annoying.
Added a new flag ('-Q', which means 'quiet') to disable the real-time throughput reporting.
2020-03-24 00:55:04 -07:00
Simon Xiao f793504eec bug fix: set the default IPv6 address on receiver side, if not specified 2020-03-24 00:23:22 -07:00
Simon Xiao 35fd73092a Verify the receiver IP address specified
If the IP address specified in receiver side does not belong to the receiver computer, then exit the receiver.
2020-03-24 00:12:00 -07:00
Alan Jowett ae7e2cfcbc
Add support for generating install target for make (#37)
* Add support for generating install target for make

* Add include(GNUInstallDirs) to fix install command
2020-02-07 11:39:28 -08:00
Simon Xiao 58cfd888c2
Update CMake file to include the new logger.c 2019-10-18 19:29:32 -07:00
Simon Xiao 74b81726ac
Update README.md 2019-10-18 19:20:56 -07:00
Simon Xiao 4bae23464e
Update README.md 2019-10-18 19:18:26 -07:00
Sergey Bronnikov 2956326c27 CMake support (#33)
* Add CMake support

* Update build steps in README
2019-10-18 18:54:47 -07:00
Simon Xiao 1f084a6fd0 Refactor the logging and add support for capturing console log into file 2019-10-17 23:13:29 -07:00
Athanasios Kostopoulos 6d16be2bd8 now properly installs under /usr/local, unless told otherwise via env var 2019-10-17 19:55:59 +02:00
Simon Xiao deefb9cd58 Close files which are opened for reading system counters 2019-06-11 22:20:22 -07:00
Simon Xiao 33ecfc1b52 fix comment typo found from spell checking 2019-06-09 00:22:05 -07:00
Simon Xiao e76e65f122 Update README with latest available features 2019-06-04 23:15:23 -07:00
Simon Xiao 1f520c7ec6 Adjust some of the tool parameters
Change below short options to long options for a better usability:

1. '-R' -> '--show-tcp-retrans'
2. '-K' -> '--show-nic-packets'
3. '-I' -> '--show-dev-interrupts'
2019-06-04 22:52:35 -07:00
Simon Xiao 7a0826d54c add long option "--fq-rate-limit" to support fq rate limit 2019-06-04 13:04:11 -07:00
Simon Xiao bffcfb086f provide warning message in log if network bandwidth is being limited 2019-05-30 22:47:31 -07:00
Simon Xiao 63d151798d bug fix: correct the bandwidth limit per thread
The current bandwidth limit is implemented per thread in the application, not per socket (connection).

Also initialize the "hold_on" flag as "false".
2019-05-30 22:18:56 -07:00
Simon Xiao 16fff03395 Clarify the “total_threads” difference on receiver and sender
1. Receiver has a delegated thread for sync (if this is not explicitly disabled). This sync thread is the last element of the thread array in receiver side code.

2. Sender does not have a delegated thread for sync; sender will use the main thread for sync.
2019-05-30 17:42:47 -07:00
Simon Xiao 297690c5e6 Change the test bandwidth limit implementation
Now implement the bandwidth limit by hold-on/pause the traffic in ntttcp application.
If the bandwidth is higher than the limit, then hold on senders to send traffic.

This bandwidth limit works for both TCP and UDP tests.

Future work: maybe we can increase the accuracy of the limit by:
a) more frequent throughput check;
b) or, set a range (high_water and low_water) to pause/resume the traffic.
2019-05-30 17:09:09 -07:00
Simon Xiao c5eb94c43f Add network bandwidth limit (by fq pacing rate) 2019-05-30 16:03:29 -07:00
Simon Xiao 053b795c7f
Version: 1.4.0 2019-05-30 15:52:05 -07:00
Nuno Das Neves 443788158d Only set CC to gcc if undefined (#29) 2019-05-29 14:18:16 -07:00
Liz Zhang 58b69326a9 Fix setting server addr for UDP stream (#28) 2019-05-21 16:58:23 -07:00
Simon Xiao 3a75e95bc0 Fix a bug in the sender side ulimit check 2019-04-12 15:07:17 -07:00
Simon Xiao 5b4d122744 Add a timeout const for sender to establish all connections 2019-04-12 15:06:31 -07:00
Liz Zhang e99becb32f Sender waits for all connection created then request receiver to start test, and start to send data (#27)
* Use epoll() for sync connection. This is for the consideration of multiple node testing. Many connections have been established but a new sender node now wants to join (by sync first)

* Start to run throughput after all required connections created.
2019-04-11 15:05:52 -07:00
Liz Zhang 5aba4908f6 Fix issue of EINPROGRESS connection (#25)
* Fix the error 115 issue of tcp connection

* Ignore the EINPROGRESS error when connecting to server

* Ignore the EINPROGRESS error and try to create new connection

* Wait 1 second before sending data
2019-03-22 12:08:29 -07:00
Anatol Belski cfd0a96cc7 Fix memory leaks (#21)
* If not verbose, the passed msg still needs to be free'd

* Fix memory leak

* Fix memory leak
2019-01-25 12:34:09 -08:00