TCP Throughput Calculator
.calc-header {
margin-bottom: 30px;
padding: 25px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
color: white;
}
.calc-header h2 {
margin-top: 0;
color: white;
font-size: 28px;
margin-bottom: 10px;
}
.calc-header p {
margin: 10px 0;
opacity: 0.95;
font-size: 15px;
}
.input-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
margin-top: 20px;
}
.input-group {
display: flex;
flex-direction: column;
}
.input-group label {
margin-bottom: 8px;
font-weight: bold;
font-size: 14px;
}
.input-group input {
padding: 14px;
font-size: 16px;
border: 2px solid rgba(255,255,255,0.3);
border-radius: 6px;
font-family: 'Courier New', monospace;
background: rgba(255,255,255,0.95);
transition: all 0.3s ease;
}
.input-group input:focus {
outline: none;
border-color: #4CAF50;
background: white;
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}
.button-container {
margin-top: 20px;
}
.calc-button {
padding: 14px 35px;
font-size: 16px;
background: #4CAF50;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: bold;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.calc-button:hover {
background: #45a049;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.calc-button:active {
background: #3d8b40;
transform: translateY(0);
}
.help-text {
margin-top: 15px;
font-size: 14px;
color: rgba(255,255,255,0.9);
background: rgba(0,0,0,0.1);
padding: 10px 15px;
border-radius: 4px;
}
.help-text strong {
color: white;
}
.result-section {
background: white;
border: 1px solid #e0e0e0;
border-radius: 8px;
margin-bottom: 15px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
transition: all 0.3s ease;
display: none;
}
.result-section.show {
display: block;
}
.result-section:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.section-header {
background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
color: white;
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.section-header h3 {
margin: 0;
font-size: 18px;
display: flex;
align-items: center;
gap: 10px;
}
.section-header .icon {
font-size: 20px;
}
.section-content {
padding: 20px;
background: #fafafa;
}
.data-row {
display: flex;
margin: 12px 0;
padding: 10px;
background: white;
border-radius: 4px;
border-left: 3px solid #4CAF50;
}
.data-label {
font-weight: bold;
color: #555;
min-width: 220px;
flex-shrink: 0;
}
.data-value {
color: #333;
font-family: 'Courier New', monospace;
word-break: break-word;
font-size: 16px;
}
.data-value.highlight {
color: #4CAF50;
font-weight: bold;
font-size: 18px;
}
.info-section {
margin-top: 30px;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
border-top: 3px solid #4CAF50;
}
.info-section h3 {
margin-top: 0;
color: #333;
font-size: 18px;
}
.info-section p {
color: #666;
line-height: 1.6;
}
.formula {
background: #f5f5f5;
padding: 15px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 15px;
margin: 15px 0;
border-left: 3px solid #667eea;
}
/* Responsive design */
@media (max-width: 768px) {
.input-grid {
grid-template-columns: 1fr;
}
.data-row {
flex-direction: column;
}
.data-label {
margin-bottom: 5px;
min-width: auto;
}
}
Máy tính thông lượng TCP
Tính toán thông lượng TCP tối đa theo lý thuyết dựa trên kích thước cửa sổ TCP và độ trễ mạng.
Giá trị ví dụ:Kích thước cửa sổ mặc định là 65.536 byte (64 KB). Độ trễ 0,01 giây = thời gian khứ hồi 10 mili giây.
📊Kết quả tính toán
Thông lượng tối đa (bps):
-
Thông lượng tối đa (Mbps):
-
Thông lượng tối đa (Gbps):
-
Giới thiệu về thông lượng TCP
Thông lượng TCP bị giới hạn bởi kích thước cửa sổ TCP và độ trễ mạng. Thông lượng tối đa theo lý thuyết có thể được tính bằng công thức dưới đây:
Thông lượng (bps) = (Kích thước cửa sổ TCP tính bằng byte × 8) / Độ trễ tính bằng giây
Kích thước cửa sổ TCP:Lượng dữ liệu có thể được gửi trước khi yêu cầu xác nhận từ người nhận. Cửa sổ lớn hơn cho phép nhiều dữ liệu hơn trong chuyến bay, cải thiện thông lượng trên các liên kết có độ trễ cao.
Độ trễ:Thời gian khứ hồi (RTT) giữa người gửi và người nhận. Độ trễ cao hơn làm giảm thông lượng cho một kích thước cửa sổ nhất định.
Ghi chú:Tính toán này đại diện cho mức tối đa theo lý thuyết. Thông lượng thực tế có thể thấp hơn do mất gói, tắc nghẽn, độ trễ xử lý và chi phí giao thức.