import subprocess from time import perf_counter as time DATA = b'x' * 200 * 1024**2 p = subprocess.Popen(['cat'], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) t = time() p.communicate(DATA) print(time() - t)