← BYTES
Unix IPC·Starter·Ref: 15.1.34

Roughly speaking, does a TIME_WAIT socket still use significant memory or CPU on the machine holding it?

Have a question about this video? Mention reference 15.1.34 when you contact us.

a.Yes, it continuously consumes as much CPU and memory as a fully active, busy connection
b.No -- it's a lightweight, mostly-idle placeholder reserving a connection's identity for a while; it doesn't transfer data or do meaningful work, just occupies a slot
c.It uses more resources than an ESTABLISHED connection
d.TIME_WAIT sockets are stored entirely on disk, not in memory
A TIME_WAIT socket isn't doing active work -- no data is being sent or received. It's a lightweight bookkeeping entry the kernel keeps around briefly, mainly to make sure that exact connection's identity (the 4-tuple of local/remote IP and port) isn't immediately reused in a way that could cause problems -- see the intermediate/advanced sections for exactly what problems.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15134#UnixIPC