LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2012, 12:19 PM   #1
Raheel Hassan
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: 0
How to calculate Network bandwidth, disk space, processing power and memory of a msg.


Hi all,

I need to calculate the Network bandwidth, disk space, processing power and memory of some messages that i exchanged between two computers (sender and receiver).

For example if the message is "I am working for three (3) hours"
How much network bandwidth will it use?
How much disk space will be used?
How much processing power will be utilize at the sender and the receiving end?
How much disk space will be used at both the ends?

if i will send this message 10, 100, or 1000 times.

Thanks for your guidance.
 
Old 02-08-2012, 12:51 PM   #2
bircoph
LQ Newbie
 
Registered: Feb 2012
Location: Moscow
Distribution: Gentoo
Posts: 2

Rep: Reputation: Disabled
This depends on both programming language and implementation.

Let's assume you are writing code in pure C and sending a single message. If you are using UDP protocol and a short (up to kilobyte) ascii-coded message, then network bandwidth will be: message itself + packet header.

For TCP you must take into account connection establishment packets, possible retransmissions. For larger messages you must consider multiple packets, fragmentation, possible reordering lossess.

In general no disk space will be used, except for your program binary itself and libraries it uses. But if your programs or your system logs something on your packets... You got the idea.

CPU and memory utilization depends on both quality of your code and quality of your system libraries (as well as kernel and other libraries in use). No one can calculate this directly, but you may found this out experimentally on your own. For CPU utilization you may use oprofile and gprof coverage. For memory usage valgrind is your best friend.
 
Old 02-09-2012, 03:21 AM   #3
Raheel Hassan
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
I used perl sockets to exchange the messages between two computers. I need some solution which i can do it quickly. The tools you have mentioned needs a lot of work. I need some quick solution that can help me to calculte the rough usages.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate network bandwidth using java code? SarahRashad Linux - Newbie 1 01-10-2012 12:18 PM
Distributed processing AMD chipset / motherboard / memory / network questions wevl Linux - Hardware 0 08-11-2011 11:44 PM
Displaying free disk space and memory kanik Programming 10 08-24-2008 10:22 PM
Use the maximun processing power to calculate the factorial of 80,000. How? TruongAn Programming 26 12-12-2005 03:08 PM
Do I have enough disk space and memory? MarkFour Linux - Newbie 2 02-06-2004 07:43 PM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration