I have written a simulator of a client-server based distributed file system. Now to calculate the average block access time, I want the following:
Assuming if the block size is 64MB...
Could any one give me approximate times... Links to prove it would be appreciated...
Thanks.
Why don't you simply measure it?
For network, use the ping command to measure latency, and divide 64MB by available bandwith for propagation delay. For files use cat, for main memory, use
public static void main(String[] args) {
byte[] data = new byte[64*1024*1024];
long start = System.nanoTime();
int sum = 0;
for (byte b : data) {
sum += b;
}
long end = System.nanoTime();
System.out.println(new BigDecimal(end - start).movePointLeft(9));
}
Which on my machine yields
0.209555405