Gs-commits
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 451 discussions
Grayskull Repository branch, master, updated. git-migration-425-g4605806
by noreply@mcs.anl.gov 26 Feb '10
by noreply@mcs.anl.gov 26 Feb '10
26 Feb '10
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 4605806bd39237d6e7f6c5cc4146d8bf2cb8acd6 (commit)
from 8e69354fb0066f5040497cfafd762bc1c130d3b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4605806bd39237d6e7f6c5cc4146d8bf2cb8acd6
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Feb 26 12:02:30 2010 -0800
Also validate Copies performed at the end of the simulation.
Cleaned up some possible confusion with names of current and next Fault.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/src/gobs/sim/Fault.java | 12 ++++++-
sim/gobs/src/gobs/sim/KClosest.java | 5 ++-
sim/gobs/src/gobs/sim/Metric.java | 1 -
sim/gobs/src/gobs/sim/Nearest.java | 2 -
sim/gobs/src/gobs/sim/Placement.java | 3 +-
sim/gobs/src/gobs/sim/Rebuild.java | 36 +++++++++++++------
sim/gobs/src/gobs/sim/Simulator.java | 64 ++++++++++++++++++++-------------
7 files changed, 80 insertions(+), 43 deletions(-)
Diff of changes:
diff --git a/sim/gobs/src/gobs/sim/Fault.java b/sim/gobs/src/gobs/sim/Fault.java
index 4451f06..8c73e6e 100644
--- a/sim/gobs/src/gobs/sim/Fault.java
+++ b/sim/gobs/src/gobs/sim/Fault.java
@@ -10,8 +10,13 @@ class Fault
/**
If set, data was lost as a result of this Fault.
*/
- static boolean dataLost = false;
+ boolean dataLost = false;
+ /**
+ The Rebuild that responded to this Fault.
+ */
+ Rebuild rebuild;
+
Fault(Simulator simulator)
{
super(simulator);
@@ -21,6 +26,11 @@ class Fault
dataLost = true;
}
+ void rebuild(Rebuild rebuild)
+ {
+ this.rebuild = rebuild;
+ }
+
String log()
{
return "Fault(" + Time.toString(finish) + ")";
diff --git a/sim/gobs/src/gobs/sim/KClosest.java b/sim/gobs/src/gobs/sim/KClosest.java
index 6df8113..69466d6 100644
--- a/sim/gobs/src/gobs/sim/KClosest.java
+++ b/sim/gobs/src/gobs/sim/KClosest.java
@@ -150,7 +150,8 @@ abstract class KClosest
public boolean share(Node node1, Node node2)
{
- boolean b = node1.neighbors.contains(node2);
- return b;
+ // boolean b = node1.neighbors.contains(node2);
+ // return b;
+ return true;
}
}
diff --git a/sim/gobs/src/gobs/sim/Metric.java b/sim/gobs/src/gobs/sim/Metric.java
index 3b4b7cd..a784e2a 100644
--- a/sim/gobs/src/gobs/sim/Metric.java
+++ b/sim/gobs/src/gobs/sim/Metric.java
@@ -63,7 +63,6 @@ public abstract class Metric
}
simulator.print("rebuilds", "regimen: " + object);
Sites sites = sites(object, system);
- SecondaryObject secondary;
// The node that should have the primary in the current system
Node primaryNode = sites.primary();
// The node that currently holds the primary
diff --git a/sim/gobs/src/gobs/sim/Nearest.java b/sim/gobs/src/gobs/sim/Nearest.java
index e134d21..c84823d 100644
--- a/sim/gobs/src/gobs/sim/Nearest.java
+++ b/sim/gobs/src/gobs/sim/Nearest.java
@@ -2,8 +2,6 @@
package gobs.sim;
import java.math.BigInteger;
-import java.util.*;
-
import gobs.util.Tools;
/**
diff --git a/sim/gobs/src/gobs/sim/Placement.java b/sim/gobs/src/gobs/sim/Placement.java
index 4ed7f26..88693fa 100644
--- a/sim/gobs/src/gobs/sim/Placement.java
+++ b/sim/gobs/src/gobs/sim/Placement.java
@@ -89,7 +89,8 @@ public abstract class Placement
*/
void copy(Copy copy)
{
- simulator.printNodeObjects(simulator.nodes);
+ if (simulator.enabled("debug.copies"))
+ simulator.printNodeObjects(simulator.nodes);
simulator.print("rebuilds", "perform: " + copy);
copy.destination.add(copy.object);
}
diff --git a/sim/gobs/src/gobs/sim/Rebuild.java b/sim/gobs/src/gobs/sim/Rebuild.java
index ac98516..99aa8af 100644
--- a/sim/gobs/src/gobs/sim/Rebuild.java
+++ b/sim/gobs/src/gobs/sim/Rebuild.java
@@ -1,8 +1,6 @@
package gobs.sim;
-// import java.text.DecimalFormat;
-import java.math.BigInteger;
import java.util.*;
import gobs.util.*;
@@ -49,11 +47,16 @@ public class Rebuild
*/
Repair repair;
+ /**
+ The fault that caused this Rebuild.
+ */
+ Fault fault;
+
/**
The fault that will occur after this Rebuild has started.
May or may not interrupt this Rebuild.
*/
- Fault fault;
+ Fault next;
/**
Copies caused by this Rebuild.
@@ -67,13 +70,16 @@ public class Rebuild
/**
@param fault The fault that may interrupt this Rebuild.
+ @param repair The Repair that repairs {@link fault}.
*/
- Rebuild(Simulator simulator, Fault fault, Repair repair)
+ Rebuild(Simulator simulator, Fault fault, Fault next, Repair repair)
{
this.simulator = simulator;
- this.fault = fault;
+ this.fault = fault;
+ this.next = next;
this.repair = repair;
- simulator.inflight.add(fault);
+ fault.rebuild(this);
+ simulator.inflight.add(next);
simulator.inflight.add(repair);
}
@@ -161,13 +167,23 @@ public class Rebuild
*/
void completeCopy(Copy copy)
{
- simulator.placer.copy(copy);
+ List<Copy> extras = performCopy(copy);
copy.source.stopStreamFrom(copy);
copy.destination.stopStreamTo(copy);
- List<Copy> extras = validate(copy.object, copy.destination);
add(extras);
- }
+ }
+ /**
+ Perform the Copy and validate it.
+ Return any new work to do.
+ */
+ List<Copy> performCopy(Copy copy)
+ {
+ simulator.placer.copy(copy);
+ List<Copy> extras = validate(copy.object, copy.destination);
+ return extras;
+ }
+
/**
Ensure that the replica count is restored.
Remove extraneous replicas or return a new Copy if needed.
@@ -179,8 +195,6 @@ public class Rebuild
{
List<Copy> result = new ArrayList<Copy>();
- int replicas = object.replicas;
-
List<Node> stores = simulator.scanStorage(object, node.neighbors);
Sites holders = simulator.placer.sites(object, stores);
Sites sites = simulator.placer.sites(object);
diff --git a/sim/gobs/src/gobs/sim/Simulator.java b/sim/gobs/src/gobs/sim/Simulator.java
index 0f6919d..b2473dc 100644
--- a/sim/gobs/src/gobs/sim/Simulator.java
+++ b/sim/gobs/src/gobs/sim/Simulator.java
@@ -278,7 +278,7 @@ public class Simulator
computeStatistics();
double t = new Date().getTime() - launch.getTime();
- System.out.println("SIMULATOR_TIME: " + Time.toString(t));
+ System.out.println("SIMULATOR_TIME: " + Time.toString(t/1000));
Simulator.current = null;
}
@@ -661,10 +661,12 @@ public class Simulator
void induceFaults()
{
System.out.println("faults: " + totalFaults);
- Fault fault = new Fault(this);
- advanceTo(fault.finish);
+ Fault fault = null;
+ Fault next = new Fault(this);
+ advanceTo(next.finish);
while (! complete())
{
+ fault = next;
System.out.println("fault: " + faultCount);
Node failed = induceFault(fault);
if (nodes.size() == 0)
@@ -673,15 +675,9 @@ public class Simulator
todo.addAll(fixes);
Collection<Gob> damaged = failed.collection();
placer.drop(failed);
- fault = rebuild(failed, damaged);
+ next = rebuild(fault, failed, damaged);
}
- System.out.println("END: " + Time.toString(time));
- if (bool("print.rebuilds"))
- System.out.println("flushing copies:");
- performCopies(inflight);
- performCopies(todo);
- if (bool("print.nodes"))
- printNodeObjects(nodes);
+ finish(fault);
}
double pullFault()
@@ -693,28 +689,29 @@ public class Simulator
Perform a Rebuild.
@return The next Fault to occur.
*/
- Fault rebuild(Node failed, Collection<Gob> damaged)
+ Fault rebuild(Fault fault, Node failed, Collection<Gob> damaged)
{
- Fault fault = startRebuild(failed);
+ Fault next = startRebuild(fault, failed);
List<Copy> work = planCopies(damaged);
currentRebuild.rebuild(work);
completeRebuild();
- return fault;
+
+ return next;
}
/**
Setup a Rebuild.
@return The next Fault to occur.
*/
- Fault startRebuild(Node failed)
+ Fault startRebuild(Fault fault, Node failed)
{
- // Schedule the next fault:
- Fault fault = new Fault(this);
Repair repair = new Repair(this, failed, time, fault.dataLost);
- Rebuild rebuild = new Rebuild(this, fault, repair);
+ // Schedule the next fault:
+ Fault next = new Fault(this);
+ Rebuild rebuild = new Rebuild(this, fault, next, repair);
repair.setRebuild(rebuild);
currentRebuild = rebuild;
- return fault;
+ return next;
}
/**
@@ -795,12 +792,12 @@ public class Simulator
}
/**
- Actually perform copies that completed during the Rebuild.
+ Actually perform copies that completed during a Rebuild.
Clears completed entries from set.
@param copies Index of {@link Placement#regimen} output
@param done Set of Objects that were copied
*/
- void performCopies(Set<? extends Event> set)
+ void performCopies(Fault fault, Set<? extends Event> set)
{
Iterator<? extends Event> it = set.iterator();
while (it.hasNext())
@@ -809,10 +806,9 @@ public class Simulator
if (event instanceof Copy)
{
Copy copy = (Copy) event;
- if (! copy.destination.contains(copy.object.id))
- placer.copy((Copy) event);
- else
- System.out.println("copy unnecessary: " + copy);
+ List<Copy> extras = fault.rebuild.performCopy(copy);
+ for (Copy extra : extras)
+ print("rebuilds", "extra: " + extra);
it.remove();
}
}
@@ -828,6 +824,24 @@ public class Simulator
printNodeObjects(nodes);
}
+ /**
+ Wrap up after the induceFaults() loop.
+ Perform any outstanding copies
+ in {@link inflight} or {@link todo}.
+ @param last The final fault. This and its corresponding
+ Rebuild will be charged with any remaining work.
+ */
+ void finish(Fault last)
+ {
+ System.out.println("END: " + Time.toString(time));
+ if (bool("print.rebuilds"))
+ System.out.println("flushing copies:");
+ performCopies(last, inflight);
+ performCopies(last, todo);
+ if (bool("print.nodes"))
+ printNodeObjects(nodes);
+ }
+
/**
Set the rebuild rate.
*/
hooks/post-receive
--
Grayskull Repository
1
0
Triton Repository branch, master, updated. 384887221f0e269cb6c92faedf01a60a50917c78
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Triton Repository".
The branch, master has been updated
via 384887221f0e269cb6c92faedf01a60a50917c78 (commit)
via 1ce35e2c579896bce3c829cb33c767b5e611013b (commit)
via f4dcceed12dedc81f5671e97527b699c5c46410f (commit)
via 1214cb26e67796d62d1e47730c0f744d2c7b0b2e (commit)
from 8395647628b5dc54b4b8f62fe3ad8024a5471965 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 384887221f0e269cb6c92faedf01a60a50917c78
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 17:47:50 2010 -0500
bug fixes in remove path
commit 1ce35e2c579896bce3c829cb33c767b5e611013b
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 17:35:44 2010 -0500
non-working object removal test
commit f4dcceed12dedc81f5671e97527b699c5c46410f
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 17:08:27 2010 -0500
hooks to remove log files
commit 1214cb26e67796d62d1e47730c0f744d2c7b0b2e
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 16:55:02 2010 -0500
rough draft of object remove function
-----------------------------------------------------------------------
Summary of changes:
.../gsl/resources/cosd-prototype/cosd-fd-cache.c | 36 +++
.../gsl/resources/cosd-prototype/cosd-fd-cache.h | 7 +
.../gsl/resources/cosd-prototype/cosd-prototype.c | 283 ++++++++++++++++++--
.../resources/cosd-prototype/cosd-prototype.gsh | 9 +
.../cosd-prototype/test/cosd-multi-object.gs | 21 ++
5 files changed, 338 insertions(+), 18 deletions(-)
Diff of changes:
diff --git a/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.c b/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.c
index 4675391..6cbb0c2 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.c
+++ b/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.c
@@ -104,6 +104,42 @@ void fd_cache_finalize(void)
return;
}
+void fd_cache_remove(uint64_t oid)
+{
+ struct gs_hash_link* tmp_link;
+ struct fd_cache_entry* tmp_entry;
+ char log_name [PATH_MAX];
+ int ret;
+
+ gs_mutex_lock(&fd_mutex);
+
+ /* do we have it open? */
+ tmp_link = gs_hash_search(oid_table, &oid);
+ if(tmp_link)
+ {
+ tmp_entry = gs_list_get_entry(tmp_link, struct fd_cache_entry,
+ hash_link);
+ /* we are in trouble if someone is using this */
+ assert(tmp_entry->ref_count == 0);
+
+ /* get rid of the fd cache entry */
+ gs_list_del(&tmp_entry->unused_link);
+ gs_list_del(&tmp_entry->hash_link);
+ close(tmp_entry->fd);
+ gs_mutex_destroy(&tmp_entry->log_offset_mutex);
+ free(tmp_entry);
+ hash_count--;
+ }
+
+ /* actually unlink the log file */
+ sprintf(log_name, "%s/%llu.dat", fd_cache_cosd_log_path,
+ llu(oid));
+ unlink(log_name);
+
+ gs_mutex_unlock(&fd_mutex);
+ return;
+}
+
struct fd_cache_entry* fd_cache_get(uint64_t oid)
{
struct gs_hash_link* tmp_link;
diff --git a/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.h b/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.h
index 30b93b7..3386d4b 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.h
+++ b/oldcode/src/gsl/resources/cosd-prototype/cosd-fd-cache.h
@@ -55,6 +55,13 @@ void fd_cache_put(
struct fd_cache_entry* entry /**< entry to put */
);
+/**
+ * Removes an object
+ */
+void fd_cache_remove(
+ uint64_t oid /**< object ID */
+);
+
#endif
diff --git a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
index a6c9d85..1369a2d 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
+++ b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
@@ -158,6 +158,9 @@ struct cosd_work
uint64_t requested_oid;
uint64_t* out_oid;
} create;
+ struct remove_op{
+ uint64_t oid;
+ } remove;
struct write_op{
uint64_t oid;
uint64_t fork;
@@ -763,7 +766,6 @@ static int read_op_worker(struct gs_op* op)
int ret;
DB_TXN *txn;
DBT key, value;
- char log_name[PATH_MAX];
int done = 0;
int mem_index = 0;
int obj_index = 0;
@@ -1080,9 +1082,6 @@ static int write_op_worker(struct gs_op* op)
{
struct cosd_op *c_op;
int ret;
- DB_TXN *txn;
- DBT key, value;
- char log_name[PATH_MAX];
int done = 0;
int mem_index = 0;
int obj_index = 0;
@@ -1240,27 +1239,23 @@ static int dump_op_worker(struct gs_op* op)
int ret;
DB_TXN *txn;
DBC *log_map_dbcp, *missing_ver_dbcp, *ver_dbcp;
- DBT log_map_key, missing_ver_key, ver_key, log_offset_key;
- DBT log_map_value, missing_ver_value, ver_value, log_offset_value;
+ DBT log_map_key, missing_ver_key, ver_key;
+ DBT log_map_value, missing_ver_value, ver_value;
int c_get_flag = DB_SET_RANGE;
/* keys for each db */
struct logical_map_key lmk;
struct missing_version mvk;
- uint64_t lok;
- uint64_t vk;
+ uint64_t vk = 0;
COSD_INIT_DBT(log_map_key, lmk);
COSD_INIT_DBT(missing_ver_key, mvk);
- COSD_INIT_DBT(log_offset_key, lok);
COSD_INIT_DBT(ver_key, vk);
/* values for each db */
struct logical_map_entry lmv;
uint64_t vv;
- int64_t lov;
COSD_INIT_DBT(log_map_value, lmv);
COSD_INIT_DBT_EMPTY(missing_ver_value);
- COSD_INIT_DBT(log_offset_value, lov);
COSD_INIT_DBT(ver_value, vv);
c_op = gs_op_entry(op, struct cosd_op, op);
@@ -1274,7 +1269,7 @@ static int dump_op_worker(struct gs_op* op)
return(1);
}
- /* create cursors on all 4 dbs */
+ /* create cursors on all 3 dbs */
ret = log_map_dbp->cursor(log_map_dbp, txn, &log_map_dbcp, 0);
assert(ret == 0); /* TODO: err handling */
ret = ver_dbp->cursor(ver_dbp, txn, &ver_dbcp, 0);
@@ -1282,6 +1277,7 @@ static int dump_op_worker(struct gs_op* op)
ret = missing_ver_dbp->cursor(missing_ver_dbp, txn, &missing_ver_dbcp, 0);
assert(ret == 0); /* TODO: err handling */
+ printf("Dumping VOSD contents...\n");
/* loop through version db, one entry per object */
while ((ret = ver_dbcp->c_get(ver_dbcp, &ver_key, &ver_value, DB_NEXT)) == 0)
{
@@ -1344,6 +1340,218 @@ static int dump_op_worker(struct gs_op* op)
}
+/* remove_op_worker()
+ *
+ * removes an object
+ */
+/* TODO: audit for deadlocks */
+/* TODO: figure out how to prevent races with read, write, etc. */
+static int remove_op_worker(struct gs_op* op)
+{
+ struct cosd_op *c_op;
+ int ret;
+ DB_TXN *txn;
+ DBC *log_map_dbcp, *missing_ver_dbcp;
+ DBT log_map_key, missing_ver_key, ver_key;
+ DBT log_map_value, missing_ver_value, ver_value;
+ int c_get_flag = DB_SET_RANGE;
+ struct logical_map_key lmk;
+ struct missing_version mvk;
+ uint64_t vk;
+ struct logical_map_entry lmv;
+ uint64_t vv;
+
+ /* keys for each db */
+ COSD_INIT_DBT(log_map_key, lmk);
+ COSD_INIT_DBT(missing_ver_key, mvk);
+ COSD_INIT_DBT(ver_key, vk);
+
+ /* values for each db */
+ COSD_INIT_DBT(log_map_value, lmv);
+ COSD_INIT_DBT_EMPTY(missing_ver_value);
+ COSD_INIT_DBT(ver_value, vv);
+
+ c_op = gs_op_entry(op, struct cosd_op, op);
+ assert(c_op);
+
+ vk = c_op->work.u.remove.oid;
+
+remove_op_retry:
+
+ ret = envp->txn_begin(envp, NULL, &txn, 0);
+ if(ret != 0)
+ {
+ /* TODO: error handling */
+ c_op->error_code = -1;
+ return(1);
+ }
+
+ /* delete version key */
+ ret = ver_dbp->del(ver_dbp, txn, &ver_key, 0);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ txn->abort(txn);
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ else if(ret == DB_NOTFOUND)
+ {
+ /* this object didn't exist */
+ ret = txn->commit(txn, 0);
+ if(ret != 0)
+ {
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+ else
+ {
+ c_op->error_code = -ENOENT;
+ return(1);
+ }
+ }
+ else if(ret != 0)
+ {
+ txn->abort(txn);
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ /* create cursors for any remaining metadata */
+ ret = log_map_dbp->cursor(log_map_dbp, txn, &log_map_dbcp, 0);
+ if(ret != 0)
+ {
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ ret = missing_ver_dbp->cursor(missing_ver_dbp, txn, &missing_ver_dbcp, 0);
+ if(ret != 0)
+ {
+ log_map_dbcp->c_close(log_map_dbcp);
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ /* search for any missing versions */
+ mvk.oid = vk;
+ mvk.version = 0;
+ c_get_flag = DB_SET_RANGE;
+ while((ret = missing_ver_dbcp->c_get(missing_ver_dbcp,
+ &missing_ver_key, &missing_ver_value, c_get_flag)) == 0)
+ {
+ if(mvk.oid != vk)
+ break;
+ c_get_flag = DB_NEXT;
+
+ /* delete it */
+ ret = missing_ver_dbcp->c_del(missing_ver_dbcp, 0);
+ if(ret != 0)
+ {
+ log_map_dbcp->c_close(log_map_dbcp);
+ missing_ver_dbcp->c_close(missing_ver_dbcp);
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+ }
+ if(ret != 0 && ret != DB_NOTFOUND)
+ {
+ log_map_dbcp->c_close(log_map_dbcp);
+ missing_ver_dbcp->c_close(missing_ver_dbcp);
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ /* search for logical map entries */
+ lmk.oid = vk;
+ lmk.fork = 0;
+ lmk.logical_offset_end = 0;
+ c_get_flag = DB_SET_RANGE;
+ while((ret = log_map_dbcp->c_get(log_map_dbcp,
+ &log_map_key, &log_map_value, c_get_flag)) == 0)
+ {
+ /* stop iterating if we go past the oid */
+ if(lmk.oid != vk)
+ break;
+ c_get_flag = DB_NEXT;
+
+ /* delete it */
+ ret = log_map_dbcp->c_del(log_map_dbcp, 0);
+ if(ret != 0)
+ {
+ log_map_dbcp->c_close(log_map_dbcp);
+ missing_ver_dbcp->c_close(missing_ver_dbcp);
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+ }
+ if(ret != 0 && ret != DB_NOTFOUND)
+ {
+ log_map_dbcp->c_close(log_map_dbcp);
+ missing_ver_dbcp->c_close(missing_ver_dbcp);
+ txn->abort(txn);
+ if(ret == DB_LOCK_DEADLOCK)
+ {
+ deadlock_counter++;
+ goto remove_op_retry;
+ }
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ log_map_dbcp->c_close(log_map_dbcp);
+ missing_ver_dbcp->c_close(missing_ver_dbcp);
+
+ ret = txn->commit(txn, 0);
+ if(ret != 0)
+ {
+ /* TODO: error handling */
+ assert(0);
+ }
+
+ /* get rid of the underlying file */
+ fd_cache_remove(vk);
+
+ c_op->error_code = 0;
+ return(1);
+}
+
+
/* create_op_worker()
*
* creates an object
@@ -1356,7 +1564,6 @@ static int create_op_worker(struct gs_op* op)
DB_TXN *txn;
int64_t val;
DBT key, value;
- char log_name[PATH_MAX];
struct fd_cache_entry* fd_entry;
c_op = gs_op_entry(op, struct cosd_op, op);
@@ -1364,11 +1571,7 @@ static int create_op_worker(struct gs_op* op)
*c_op->work.u.create.out_oid = c_op->work.u.create.requested_oid;
- /* implicitly create the data file */
- fd_entry = fd_cache_get(c_op->work.u.create.requested_oid);
- /* TODO: error handling */
- assert(fd_entry);
- fd_cache_put(fd_entry);
+ /* TODO: crap; need to check for existence using version db */
/* do db stuff */
ret = envp->txn_begin(envp, NULL, &txn, 0);
@@ -1398,6 +1601,12 @@ static int create_op_worker(struct gs_op* op)
assert(0);
}
+ /* implicitly create the data file */
+ fd_entry = fd_cache_get(c_op->work.u.create.requested_oid);
+ /* TODO: error handling */
+ assert(fd_entry);
+ fd_cache_put(fd_entry);
+
c_op->error_code = 0;
return(1);
@@ -1681,6 +1890,8 @@ gs_ret_t gs_cosd_create_post(
c_op->op_id = gs_id_gen(gs_cosd_resource_id, (uint64_t)(op->cache_id));
c_op->work.u.create.requested_oid = requested_oid;
c_op->work.u.create.out_oid = out_oid;
+ /* we don't support automatically chosing ids */
+ assert(requested_oid != 0);
*op_id = c_op->op_id;
@@ -1700,6 +1911,42 @@ gs_ret_t (* gs_cosd_create)(
gs_context_t ctx,
gs_op_id_t *op_id) = gs_cosd_create_post;
+gs_ret_t gs_cosd_remove_post(
+ uint64_t oid,
+ void (*callback)(void *ptr, int ret),
+ void *user_ptr,
+ gs_hints_t hints,
+ gs_context_t ctx,
+ gs_op_id_t *op_id)
+{
+ struct gs_op *op;
+ struct cosd_op *c_op;
+
+ op = gs_opcache_get(cosd_opcache);
+ gs_op_fill(op, callback, user_ptr, hints, ctx);
+
+ c_op = gs_op_entry(op, struct cosd_op, op);
+ c_op->op_id = gs_id_gen(gs_cosd_resource_id, (uint64_t)(op->cache_id));
+ c_op->work.u.remove.oid = oid;
+
+ *op_id = c_op->op_id;
+
+ c_op->work.op_worker = remove_op_worker;
+ c_op->work.cleanup_fn = NULL;
+
+ gs_cosd_launch_op(op, gs_cosd_progress_mode);
+
+ return 0;
+}
+gs_ret_t (* gs_cosd_remove)(
+ uint64_t oid,
+ void (*callback)(void *ptr, int ret),
+ void *user_ptr,
+ gs_hints_t hints,
+ gs_context_t ctx,
+ gs_op_id_t *op_id) = gs_cosd_remove_post;
+
+
int gs_cosd_txn_open(uint64_t oid, uint64_t fork, uint64_t txn_number)
{
struct txn_accumulator *txn_acc;
diff --git a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.gsh b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.gsh
index a16ba06..bb03588 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.gsh
+++ b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.gsh
@@ -57,6 +57,15 @@ __blocking int gs_cosd_create(
);
/**
+ * Removes an existing object
+ * \return 0 on success, -errno on failure
+ */
+__blocking int gs_cosd_remove(
+ uint64_t oid /**< oid to remove */
+);
+
+
+/**
* Retrieves current version number of object
* \return 0 on success, -errno on failure
*/
diff --git a/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs b/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
index 9002ea3..5b112c5 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
+++ b/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
@@ -85,6 +85,27 @@ static __blocking int do_cosd_test(void)
ret = gs_cosd_dump();
assert(ret == 0);
+ /* delete them all */
+ for(i=0; i<500; i++)
+ {
+ oid = i+1;
+
+ ret = gs_cosd_remove(oid);
+ if(ret != 0)
+ {
+ printf("Error deleting oid=%llu\n", oid);
+ free(buffer);
+ return(1);
+ }
+ }
+
+ ret = gs_cosd_dump();
+ assert(ret == 0);
+
+ /* try to delete something that doesn't exist */
+ ret = gs_cosd_remove(0);
+ assert(ret == -ENOENT);
+
free(buffer);
return 0;
}
hooks/post-receive
--
Triton Repository
1
0
Grayskull Repository branch, master, updated. 8395647628b5dc54b4b8f62fe3ad8024a5471965
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 8395647628b5dc54b4b8f62fe3ad8024a5471965 (commit)
from e91f01346cc79383b410a3db7be3e8b66df46fff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8395647628b5dc54b4b8f62fe3ad8024a5471965
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 15:51:26 2010 -0500
test program to exercise multi-object support
-----------------------------------------------------------------------
Summary of changes:
.../gsl/resources/cosd-prototype/cosd-prototype.c | 2 +-
.../cosd-prototype/test/cosd-multi-object.gs | 156 ++++++++++++++++++++
.../gsl/resources/cosd-prototype/test/module.mk.in | 1 +
3 files changed, 158 insertions(+), 1 deletions(-)
create mode 100644 oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
Diff of changes:
diff --git a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
index 6521983..a6c9d85 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
+++ b/oldcode/src/gsl/resources/cosd-prototype/cosd-prototype.c
@@ -1322,7 +1322,7 @@ static int dump_op_worker(struct gs_op* op)
lld(lmv.size), lld(lmv.log_offset), llu(lmv.version));
c_get_flag = DB_NEXT;
}
- assert(ret == DB_NOTFOUND); /* TODO: err handling */
+ assert(ret == 0 || ret == DB_NOTFOUND); /* TODO: err handling */
printf("\n");
}
diff --git a/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs b/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
new file mode 100644
index 0000000..9002ea3
--- /dev/null
+++ b/oldcode/src/gsl/resources/cosd-prototype/test/cosd-multi-object.gs
@@ -0,0 +1,156 @@
+
+#include <stdio.h>
+#include <errno.h>
+#include "../../../include/gs.h"
+#include "../cosd-prototype.gsh"
+#include "gs-config.h"
+
+/* TODO: this needs to be in a header somewhere */
+#ifndef llu
+#if SIZEOF_LONG_INT == 4
+# define llu(x) (x)
+# define lld(x) (x)
+# define SCANF_lld "%lld"
+#elif SIZEOF_LONG_INT == 8
+# define llu(x) (unsigned long long)(x)
+# define lld(x) (long long)(x)
+# define SCANF_lld "%ld"
+#else
+# error Unexpected sizeof(long int)
+#endif
+#endif
+
+static __blocking int do_cosd_test(void)
+{
+ int ret;
+ char* buffer;
+ void* void_buffer;
+
+ int64_t buffer_szs[3];
+ char* buffer_offsets[3];
+ int64_t obj_offsets[3];
+ int64_t obj_szs[3];
+ uint64_t version_array[500];
+
+ uint64_t oid;
+ uint64_t out_oid1;
+ int64_t out_size;
+
+ int i;
+
+ ret = posix_memalign(&void_buffer, 512, 4096);
+ assert(ret == 0);
+ buffer = void_buffer;
+
+ /* create and get version for 500 objects */
+ for(i=0; i<500; i++)
+ {
+ oid = i+1;
+ ret = gs_cosd_create(oid, &out_oid1);
+ if(ret != 0 && ret != -EEXIST)
+ {
+ printf("Error creating oid=%llu\n", oid);
+ free(buffer);
+ return(1);
+ }
+
+ ret = gs_cosd_get_version(oid, &version_array[i]);
+ if(ret != 0)
+ {
+ printf("Error getting version number for oid=%llu: %d\n", oid, ret);
+ free(buffer);
+ return(1);
+ }
+ }
+
+ /* write something into each object */
+ for(i=0; i<500; i++)
+ {
+ oid = i+1;
+
+ buffer_offsets[0] = buffer;
+ buffer_szs[0] = 1024;
+ obj_offsets[0] = 0;
+ obj_szs[0] = 1024;
+ ret = gs_cosd_write(oid, 0, version_array[i], buffer_offsets, buffer_szs, 1,
+ obj_offsets, obj_szs, 1, COSD_FLAG_AUTO_TXN);
+ if(ret != 0)
+ {
+ printf("Error writing 0-1024 on oid=%llu: %d\n", oid, ret);
+ free(buffer);
+ return 1;
+ }
+ }
+
+ ret = gs_cosd_dump();
+ assert(ret == 0);
+
+ free(buffer);
+ return 0;
+}
+
+int done = 0;
+
+static void done_callback(void *up, int ret)
+{
+ done = 1;
+}
+
+
+int main(int argc, char *argv[])
+{
+ gs_context_t ctx;
+ gs_op_id_t op_id;
+ int mode = GS_PROG_POLL;
+ int pc = 0;
+
+ if(argc != 2)
+ {
+ fprintf(stderr, "Usage: cosd1 <1|2>\n");
+ fprintf(stderr, " # 1 for polling\n");
+ fprintf(stderr, " # 2 for thread-per-op\n");
+ return(-1);
+ }
+
+ sscanf(argv[1], "%d", &mode);
+ if(mode > 2 || mode < 1)
+ {
+ fprintf(stderr, "Usage: cosd1 <1|2>\n");
+ fprintf(stderr, " # 1 for polling\n");
+ fprintf(stderr, " # 2 for thread-per-op\n");
+ return(-1);
+ }
+
+ if(mode == 1)
+ printf("Initializing cosd in poll-driven mode...\n");
+ else
+ printf("Initializing cosd in thread-per-op mode...\n");
+
+ gs_cosd_init(mode, "/tmp/cosd");
+ printf("Done.\n");
+
+ gs_context_create(&ctx, 1, "cosd");
+
+ done = 0;
+ do_cosd_test_post(done_callback, NULL, NULL, ctx, &op_id);
+ while(done == 0)
+ {
+ pc++;
+ gs_poll(ctx, 10000);
+ fflush(NULL);
+ printf("polled %d times...\n", pc);
+ }
+
+ gs_cosd_finalize();
+ gs_context_destroy(ctx);
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
diff --git a/oldcode/src/gsl/resources/cosd-prototype/test/module.mk.in b/oldcode/src/gsl/resources/cosd-prototype/test/module.mk.in
index b0f2de9..11d46ae 100644
--- a/oldcode/src/gsl/resources/cosd-prototype/test/module.mk.in
+++ b/oldcode/src/gsl/resources/cosd-prototype/test/module.mk.in
@@ -3,6 +3,7 @@ DIR := resources/cosd-prototype/test
GSTESTSRC += $(DIR)/cosd1.gs
GSTESTSRC += $(DIR)/cosd-bench-concurrent.gs
GSTESTSRC += $(DIR)/workload-gen.gs
+GSTESTSRC += $(DIR)/cosd-multi-object.gs
MODLIBS_$(DIR) = -lpthread @DB_LIB@
hooks/post-receive
--
Grayskull Repository
1
0
UNNAMED PROJECT branch, master, updated. e91f01346cc79383b410a3db7be3e8b66df46fff
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, master has been updated
via e91f01346cc79383b410a3db7be3e8b66df46fff (commit)
via 7c2e089ac1dad95d45e466a56ed29b02931f4116 (commit)
from 1e4dbc922ff0cd96221438e4123eaa417888489e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e91f01346cc79383b410a3db7be3e8b66df46fff
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 15:01:40 2010 -0500
multi-object support in COSD/VOSD
- convert COSD/VOSD to use new fd_cache interface
- get rid of explicit db tracking of log offsets
- remove assertions for oid == 1
commit 7c2e089ac1dad95d45e466a56ed29b02931f4116
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 14:44:01 2010 -0500
added log offset tracking to fd cache
-----------------------------------------------------------------------
Summary of changes:
.../gsl/resources/cosd-prototype/cosd-fd-cache.c | 56 +++++-
.../gsl/resources/cosd-prototype/cosd-fd-cache.h | 20 ++-
.../gsl/resources/cosd-prototype/cosd-prototype.c | 220 ++++----------------
3 files changed, 111 insertions(+), 185 deletions(-)
hooks/post-receive
--
UNNAMED PROJECT
1
0
UNNAMED PROJECT branch, master, updated. 1e4dbc922ff0cd96221438e4123eaa417888489e
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, master has been updated
via 1e4dbc922ff0cd96221438e4123eaa417888489e (commit)
from 1d7795bd6c6b29a8673018a8e75a62f2ddb645fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1e4dbc922ff0cd96221438e4123eaa417888489e
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 13:34:23 2010 -0500
another test commit
-----------------------------------------------------------------------
Summary of changes:
.../gsl/resources/cosd-prototype/cosd-prototype.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
hooks/post-receive
--
UNNAMED PROJECT
1
0
UNNAMED PROJECT branch, master, updated. 1d7795bd6c6b29a8673018a8e75a62f2ddb645fc
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, master has been updated
via 1d7795bd6c6b29a8673018a8e75a62f2ddb645fc (commit)
from 64135ff4415c592ecc1d77a830f1d465a7c03be7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1d7795bd6c6b29a8673018a8e75a62f2ddb645fc
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Wed Feb 24 13:28:33 2010 -0500
whitespace change to test commit hook
-----------------------------------------------------------------------
Summary of changes:
.../gsl/resources/cosd-prototype/cosd-prototype.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
hooks/post-receive
--
UNNAMED PROJECT
1
0
Grayskull Repository branch, master, updated. git-migration-424-g8e69354
by noreply@mcs.anl.gov 24 Feb '10
by noreply@mcs.anl.gov 24 Feb '10
24 Feb '10
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 8e69354fb0066f5040497cfafd762bc1c130d3b2 (commit)
via 85903313d87b427d42c7ae21b895a3259fb768a3 (commit)
via 7cf3ff18c77ad421cb31bc679918a749a48a6820 (commit)
via 5032fb514c10d55704291b0cf97c25685778805a (commit)
from 1d12dcf18a4446584a145c0ae1eef93d70c52faf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8e69354fb0066f5040497cfafd762bc1c130d3b2
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 23 22:17:54 2010 -0800
Make small case slightly bigger, more nodes, more files.
commit 85903313d87b427d42c7ae21b895a3259fb768a3
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 23 22:17:04 2010 -0800
Bug fix to prevent intra-node object movement during promotion/demotion.
commit 7cf3ff18c77ad421cb31bc679918a749a48a6820
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 23 19:58:54 2010 -0800
Add new MTTR properties.
commit 5032fb514c10d55704291b0cf97c25685778805a
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 23 19:57:22 2010 -0800
Cleanups.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/src/gobs/sim/Node.java | 85 +++++++++++++++++++++-------
sim/gobs/src/gobs/sim/Placement.java | 7 ++-
sim/gobs/src/gobs/sim/Rebuild.java | 19 +++---
sim/gobs/src/gobs/sim/Simulator.java | 6 +-
sim/gobs/src/gobs/sim/Sites.java | 2 +-
sim/gobs/src/gobs/sweep/AbstractSweep.java | 2 -
sim/gobs/src/gobs/sweep/ArraySweep.java | 5 --
sim/gobs/src/gobs/sweep/ParallelSweep.java | 1 -
sim/gobs/src/gobs/util/Tools.java | 3 +-
sim/gobs/sweeps/disks-small.cfg | 5 +-
sim/gobs/sweeps/fs_pdsi_small.cfg | 2 +-
11 files changed, 89 insertions(+), 48 deletions(-)
Diff of changes:
diff --git a/sim/gobs/src/gobs/sim/Node.java b/sim/gobs/src/gobs/sim/Node.java
index e472b4d..46a41cd 100644
--- a/sim/gobs/src/gobs/sim/Node.java
+++ b/sim/gobs/src/gobs/sim/Node.java
@@ -9,6 +9,10 @@ import gobs.util.Tools;
/**
* Simulates an object store.
+ *
+ * Current Fault model: A Node that is down may have lost
+ * no OSDs or one OSD. A Node that is down will not lose
+ * other OSDs while down.
* */
public class Node
@@ -17,10 +21,16 @@ public class Node
Simulator simulator;
/**
- Object store.
+ Object stores.
*/
public OSD[] osd;
+ /**
+ If a data loss fault has occurred, this will note the index
+ of the failed OSD. Otherwise -1.
+ */
+ int failed = -1;
+
/**
Counter for number of pushes during rebuilds.
*/
@@ -35,7 +45,7 @@ public class Node
Counter for number of user read/write accesses.
*/
int accesses = 0;
-
+
Status status = Status.UP;
Set<Node> neighbors = new LinkedHashSet<Node>();
@@ -68,18 +78,29 @@ public class Node
ZAPPED
}
+ /**
+ Add this object to a random OSD on this Node.
+ */
void add(Gob object)
{
+ int r = Bits.nextInt(simulator.devicesPerNode);
+ add(r, object);
+ }
+
+ /**
+ Add this object to the given OSD on this Node.
+ @param d The OSD index.
+ */
+ void add(int d, Gob object)
+ {
assert(object != null);
Tools.check(! contains(object.id),
"Node.add(): " + id + " contains " +
object.toString(Simulator.current) + "\n" +
displayObjects());
-
- int r = Bits.nextInt(simulator.devicesPerNode);
- osd[r].put(object.id, object);
+ osd[d].put(object.id, object);
}
-
+
/**
Return the index of the OSD that serves id.
If not found, return -1.
@@ -139,7 +160,7 @@ public class Node
result.addAll(d.keySet());
return result;
}
-
+
/**
Return a Collection of all of this Node's objects.
*/
@@ -157,28 +178,42 @@ public class Node
void fail(boolean dataLost)
{
if (dataLost)
+ {
status = Status.ZAPPED;
+ failed = damage();
+ osd[failed].status = OSD.Status.DOWN;
+ }
else
status = Status.DOWN;
}
/**
After a Repair, remove all objects.
- @return A Set of Copies to be performed to restore this Node.
+ @return A Set of Copies to be performed to restore this Node,
+ or null if there is nothing to do.
*/
Set<Copy> reboot(Repair repair)
{
+ Set<Copy> copies = null;
simulator.nodes.add(this);
simulator.placer.register(this);
+
if (status == Status.ZAPPED)
- {
simulator.print("rebuilds", "reboot(zapped): " + this);
- damage();
- }
else
simulator.print("rebuilds", "reboot(clean): " + this);
+
+ for (Gob object : collection())
+ repair.rebuild.validate(object, this);
+
+ if (status == Status.ZAPPED)
+ {
+ osd[failed].status = OSD.Status.UP;
+ copies = rejoin(repair);
+ failed = -1;
+ }
+
status = Status.UP;
- Set<Copy> copies = rejoin(repair);
return copies;
}
@@ -201,7 +236,9 @@ public class Node
for (Gob object : objects)
{
Sites sites = simulator.placer.sites(object);
- if (sites.contains(this) && ids.add(object.id))
+ if (sites.contains(this) &&
+ (!contains(object.id)) &&
+ ids.add(object.id))
{
Node source = simulator.placer.removeSource(object, sites);
if (source == null)
@@ -288,11 +325,13 @@ public class Node
/**
Simulate a disk failure.
+ @return The index of the lost OSD.
*/
- void damage()
+ int damage()
{
int r = Bits.nextInt(simulator.devicesPerNode);
osd[r].clear();
+ return r;
}
/**
@@ -310,7 +349,7 @@ public class Node
boolean contains(BigInteger id)
{
int i = lookup(id);
- boolean b = osd[i].containsKey(id);
+ boolean b = (i >= 0);
return b;
}
@@ -342,13 +381,17 @@ public class Node
{
StringBuffer result = new StringBuffer(count()*32);
result.append(name(simulator));
- result.append(":\t");
- for (BigInteger i : keys())
+ result.append(":\n");
+ for (int i = 0; i < osd.length; i++)
{
- Gob object = get(i);
- result.append(object.toString(simulator)).append(" ");
+ result.append("\tOSD[" + i + "]: ");
+ for (BigInteger j : osd[i].keySet())
+ {
+ Gob object = get(j);
+ result.append(object.toString(simulator)).append(" ");
+ }
+ result.append("\n");
}
- result.append("\n");
return result.toString();
}
@@ -385,4 +428,4 @@ public class Node
{
return id.toString();
}
-}
+}
\ No newline at end of file
diff --git a/sim/gobs/src/gobs/sim/Placement.java b/sim/gobs/src/gobs/sim/Placement.java
index 27df63d..4ed7f26 100644
--- a/sim/gobs/src/gobs/sim/Placement.java
+++ b/sim/gobs/src/gobs/sim/Placement.java
@@ -89,6 +89,7 @@ public abstract class Placement
*/
void copy(Copy copy)
{
+ simulator.printNodeObjects(simulator.nodes);
simulator.print("rebuilds", "perform: " + copy);
copy.destination.add(copy.object);
}
@@ -181,8 +182,9 @@ public abstract class Placement
else
Tools.bail("Got unknown object!");
+ int d = node.lookup(o.id);
node.delete(o.id);
- node.add(primary);
+ node.add(d, primary);
return primary;
}
@@ -224,8 +226,9 @@ public abstract class Placement
secondary = ((PrimaryStrip) o).toSecondaryStrip(primary);
}
+ int d = node.lookup(o.id);
node.delete(o.id);
- node.add(secondary);
+ node.add(d, secondary);
}
void printRebuild(Gob object,
diff --git a/sim/gobs/src/gobs/sim/Rebuild.java b/sim/gobs/src/gobs/sim/Rebuild.java
index 64bdfc2..ac98516 100644
--- a/sim/gobs/src/gobs/sim/Rebuild.java
+++ b/sim/gobs/src/gobs/sim/Rebuild.java
@@ -127,8 +127,8 @@ public class Rebuild
{
Event event = pop();
simulator.advanceTo(event.finish);
- if (simulator.bool("print.rebuilds"))
- System.out.println("event: " + event.log());
+ /* if (simulator.bool("print.rebuilds"))
+ System.out.println("event: " + event.log()); */
if (event instanceof Copy)
{
@@ -161,9 +161,9 @@ public class Rebuild
*/
void completeCopy(Copy copy)
{
+ simulator.placer.copy(copy);
copy.source.stopStreamFrom(copy);
copy.destination.stopStreamTo(copy);
- simulator.placer.copy(copy);
List<Copy> extras = validate(copy.object, copy.destination);
add(extras);
}
@@ -171,6 +171,8 @@ public class Rebuild
/**
Ensure that the replica count is restored.
Remove extraneous replicas or return a new Copy if needed.
+ @parameter object The object in question.
+ @parameter node The node which holds the new or restored replica.
@return The Copies needed.
*/
List<Copy> validate(Gob object, Node node)
@@ -279,14 +281,13 @@ public class Rebuild
void completeRepair(Repair repair)
{
- if (simulator.bool("print.rebuilds"))
- System.out.println(repair);
+ /* if (simulator.bool("print.rebuilds"))
+ System.out.println(repair); */
Node node = repair.node;
Set<Copy> copies = node.reboot(repair);
- for (Copy copy : copies)
- {
- add(copy);
- }
+ if (copies != null)
+ for (Copy copy : copies)
+ add(copy);
}
void add(Collection<Copy> copies)
diff --git a/sim/gobs/src/gobs/sim/Simulator.java b/sim/gobs/src/gobs/sim/Simulator.java
index c9d46ba..0f6919d 100644
--- a/sim/gobs/src/gobs/sim/Simulator.java
+++ b/sim/gobs/src/gobs/sim/Simulator.java
@@ -665,6 +665,7 @@ public class Simulator
advanceTo(fault.finish);
while (! complete())
{
+ System.out.println("fault: " + faultCount);
Node failed = induceFault(fault);
if (nodes.size() == 0)
continue;
@@ -707,7 +708,6 @@ public class Simulator
*/
Fault startRebuild(Node failed)
{
- System.out.println("fault: " + faultCount);
// Schedule the next fault:
Fault fault = new Fault(this);
Repair repair = new Repair(this, failed, time, fault.dataLost);
@@ -726,10 +726,10 @@ public class Simulator
faultCount++;
int index = Bits.nextInt(nodes.size());
Node failed = nodes.remove(index);
- failed.fail(fault.dataLost);
- System.out.println("\nfailed: " + failed.name(this) +
+ System.out.println("failed: " + failed.name(this) +
" (" + failed.count() + ")" +
" at: " + Time.toString(time));
+ failed.fail(fault.dataLost);
return failed;
}
diff --git a/sim/gobs/src/gobs/sim/Sites.java b/sim/gobs/src/gobs/sim/Sites.java
index e733d84..7443608 100644
--- a/sim/gobs/src/gobs/sim/Sites.java
+++ b/sim/gobs/src/gobs/sim/Sites.java
@@ -122,7 +122,7 @@ class Sites
}
/**
- Extract out the Node list.
+ Copy out the Node list.
*/
Collection<Node> get()
{
diff --git a/sim/gobs/src/gobs/sweep/AbstractSweep.java b/sim/gobs/src/gobs/sweep/AbstractSweep.java
index 144b13a..708b1a3 100644
--- a/sim/gobs/src/gobs/sweep/AbstractSweep.java
+++ b/sim/gobs/src/gobs/sweep/AbstractSweep.java
@@ -3,8 +3,6 @@ package gobs.sweep;
import java.util.*;
-import org.jfree.data.xy.XYSeries;
-
import gobs.sim.*;
import gobs.util.*;
diff --git a/sim/gobs/src/gobs/sweep/ArraySweep.java b/sim/gobs/src/gobs/sweep/ArraySweep.java
index 83a4389..fe82155 100644
--- a/sim/gobs/src/gobs/sweep/ArraySweep.java
+++ b/sim/gobs/src/gobs/sweep/ArraySweep.java
@@ -121,19 +121,14 @@ public class ArraySweep
void arrayAvgToSeries(Set<double[]> results, XYSeries series)
{
int max = maxLength(results);
- double[] avg = new double[max];
-
for (int i = 0; i < max; i++)
- {
series.add(i, avg(i, results));
- }
}
void arrayAvgToSeries(double[] xresult, Set<double[]> yresult,
XYSeries series)
{
int max = xresult.length;
- double[] avg = new double[max];
for (int i = 0; i < max; i++)
series.add(xresult[i], avg(i, yresult));
diff --git a/sim/gobs/src/gobs/sweep/ParallelSweep.java b/sim/gobs/src/gobs/sweep/ParallelSweep.java
index c7a22a2..b23d7b0 100644
--- a/sim/gobs/src/gobs/sweep/ParallelSweep.java
+++ b/sim/gobs/src/gobs/sweep/ParallelSweep.java
@@ -76,7 +76,6 @@ public class ParallelSweep
XYSeries series = new XYSeries(description);
for (String v : values)
{
- double total = 0.0;
for (int i = 0; i < repeats; i++)
{
Simulator simulator = new Simulator();
diff --git a/sim/gobs/src/gobs/util/Tools.java b/sim/gobs/src/gobs/util/Tools.java
index cf1fdf5..bde9927 100644
--- a/sim/gobs/src/gobs/util/Tools.java
+++ b/sim/gobs/src/gobs/util/Tools.java
@@ -138,7 +138,8 @@ public class Tools
return false;
}
- public static List<String> list(Properties properties, String string)
+ public static List<String> list(Properties properties,
+ String string)
{
String text = string(properties, string);
return stringToList(text);
diff --git a/sim/gobs/sweeps/disks-small.cfg b/sim/gobs/sweeps/disks-small.cfg
index f04caba..b192371 100644
--- a/sim/gobs/sweeps/disks-small.cfg
+++ b/sim/gobs/sweeps/disks-small.cfg
@@ -1,7 +1,8 @@
-mttr = 50
+mttr.reboot = 10
+mttr.disk = 50
-disk.size = 1000000
+disk.size = 500000
disk.speed = 10000
disk.mttf.min = 2000
diff --git a/sim/gobs/sweeps/fs_pdsi_small.cfg b/sim/gobs/sweeps/fs_pdsi_small.cfg
index 6f81ea5..8314908 100644
--- a/sim/gobs/sweeps/fs_pdsi_small.cfg
+++ b/sim/gobs/sweeps/fs_pdsi_small.cfg
@@ -2,7 +2,7 @@
# FS PDSI SMALL
# Number of files:
-files = 20
+files = 30
# FileFactory implementation PlainFiles
impl.filefactory = PDSIFiles
# 20% size 0, 40% size 1K-1M, 40% size 1M-20M
hooks/post-receive
--
Grayskull Repository
1
0
Grayskull Repository branch, master, updated. git-migration-420-g1d12dcf
by noreply@mcs.anl.gov 22 Feb '10
by noreply@mcs.anl.gov 22 Feb '10
22 Feb '10
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 1d12dcf18a4446584a145c0ae1eef93d70c52faf (commit)
via 37911bea7b4dd0fea1d200218e02d3ae9cfee06c (commit)
via cc620b0b75dd331ac9084b95e604a111bb7b3b8c (commit)
via 3f59ca7dd9c4fb0e23fc7387372eecb053b51e57 (commit)
via abef0d5cab267e39cc1b0c1614714addf5f27e5f (commit)
from 9fac83298221e0856412602377f05b64ab3fc092 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1d12dcf18a4446584a145c0ae1eef93d70c52faf
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 22 17:05:42 2010 -0600
MTTRs for multiple Fault types.
commit 37911bea7b4dd0fea1d200218e02d3ae9cfee06c
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 22 15:53:53 2010 -0600
Handle case where all nodes fail.
commit cc620b0b75dd331ac9084b95e604a111bb7b3b8c
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 22 15:52:42 2010 -0600
Better parameters for small case.
commit 3f59ca7dd9c4fb0e23fc7387372eecb053b51e57
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 22 15:52:21 2010 -0600
Default to 1 repeat.
commit abef0d5cab267e39cc1b0c1614714addf5f27e5f
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Feb 19 15:50:27 2010 -0600
Bug fix and output improvements.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/src/gobs/sim/File.java | 44 +++++++++++++---
sim/gobs/src/gobs/sim/FileFactory.java | 16 ++++++-
sim/gobs/src/gobs/sim/Node.java | 57 ++++++++++++++-------
sim/gobs/src/gobs/sim/PrimaryObject.java | 2 +-
sim/gobs/src/gobs/sim/Repair.java | 11 +++-
sim/gobs/src/gobs/sim/SecondaryObject.java | 2 +-
sim/gobs/src/gobs/sim/Simulator.java | 76 ++++++++++++++++++----------
sim/gobs/src/gobs/sim/Sites.java | 14 +++++-
sim/gobs/src/gobs/sweep/x/DataLoss02.java | 7 +--
sim/gobs/sweeps/disks-small.cfg | 6 +-
sim/gobs/sweeps/sweep.zsh | 2 +-
11 files changed, 168 insertions(+), 69 deletions(-)
Diff of changes:
diff --git a/sim/gobs/src/gobs/sim/File.java b/sim/gobs/src/gobs/sim/File.java
index 6445544..3fc62d7 100644
--- a/sim/gobs/src/gobs/sim/File.java
+++ b/sim/gobs/src/gobs/sim/File.java
@@ -2,6 +2,7 @@
package gobs.sim;
import java.math.BigInteger;
+import java.text.DecimalFormat;
import java.util.Collection;
import static java.lang.Math.*;
@@ -22,6 +23,9 @@ public class File
Collection<Gob> objects = null;
+ static DecimalFormat ff = new DecimalFormat("0");
+ static DecimalFormat df = new DecimalFormat("0.0");
+
File(BigInteger size, BigInteger strip, int width, int replicas)
{
this.size = size;
@@ -95,15 +99,37 @@ public class File
public static String toString(BigInteger b)
{
- if (b.compareTo(FileFactory.TB) > 0)
- return "" + b.divide(FileFactory.TB) + "TB";
- if (b.compareTo(FileFactory.GB) > 0)
- return "" + b.divide(FileFactory.GB) + "GB";
- else if (b.compareTo(FileFactory.MB) > 0)
- return "" + b.divide(FileFactory.MB) + "MB";
- else if (b.compareTo(FileFactory.KB) > 0)
- return "" + b.divide(FileFactory.KB) + "KB";
- return "" + b + "B";
+ String result = null;
+
+ String unit = null;
+ BigInteger factor = BigInteger.ZERO;
+
+ for (BigInteger i : FileFactory.bytes.keySet())
+ {
+ if (b.compareTo(i) >= 0)
+ {
+ factor = i;
+ unit = FileFactory.bytes.get(i);
+ break;
+ }
+ }
+
+ if (factor.compareTo(BigInteger.ZERO) == 0)
+ {
+ return "0B";
+ }
+
+ double s = b.doubleValue();
+ double f = factor.doubleValue();
+ double quantity = s/f;
+ DecimalFormat tf = null;
+ if (quantity < 10)
+ tf = df;
+ else
+ tf = ff;
+
+ result = tf.format(quantity)+unit;
+ return result;
}
/**
diff --git a/sim/gobs/src/gobs/sim/FileFactory.java b/sim/gobs/src/gobs/sim/FileFactory.java
index 724c823..5da0dff 100644
--- a/sim/gobs/src/gobs/sim/FileFactory.java
+++ b/sim/gobs/src/gobs/sim/FileFactory.java
@@ -2,6 +2,8 @@
package gobs.sim;
import java.math.BigInteger;
+import java.util.*;
+
import static java.lang.Math.*;
/**
@@ -41,9 +43,21 @@ public abstract class FileFactory
*/
public static double pb = pow(1024, 5);
- public static BigInteger KB = new BigInteger("1024");
+ public static BigInteger B = BigInteger.ONE;
+ public static BigInteger KB = BigInteger.valueOf(1024);
public static BigInteger MB = KB.multiply(KB);
public static BigInteger GB = MB.multiply(KB);
public static BigInteger TB = GB.multiply(KB);
public static BigInteger PB = TB.multiply(KB);
+ public static Map<BigInteger,String> bytes =
+ new LinkedHashMap<BigInteger,String>();
+ static
+ {
+ bytes.put(PB, "PB");
+ bytes.put(TB, "TB");
+ bytes.put(GB, "GB");
+ bytes.put(MB, "MB");
+ bytes.put(KB, "KB");
+ bytes.put(B, "B");
+ }
}
diff --git a/sim/gobs/src/gobs/sim/Node.java b/sim/gobs/src/gobs/sim/Node.java
index c1c98bf..e472b4d 100644
--- a/sim/gobs/src/gobs/sim/Node.java
+++ b/sim/gobs/src/gobs/sim/Node.java
@@ -87,8 +87,9 @@ public class Node
int lookup(BigInteger id)
{
for (int i = 0; i < osd.length; i++)
- if (osd[i].containsKey(id))
- return i;
+ if (osd[i].status == OSD.Status.UP)
+ if (osd[i].containsKey(id))
+ return i;
return -1;
}
@@ -97,10 +98,11 @@ public class Node
*/
Gob get(BigInteger id)
{
- for (OSD d : osd)
- if (d.containsKey(id))
- return d.get(id);
- return null;
+ int i = lookup(id);
+ if (i >= 0)
+ return osd[i].get(id);
+ else
+ return null;
}
/**
@@ -108,10 +110,11 @@ public class Node
*/
Gob remove(BigInteger id)
{
- for (OSD d : osd)
- if (d.containsKey(id))
- return d.remove(id);
- return null;
+ int i = lookup(id);
+ if (i >= 0)
+ return osd[i].remove(id);
+ else
+ return null;
}
/**
@@ -149,16 +152,31 @@ public class Node
}
/**
+ Tell this Node to fail.
+ */
+ void fail(boolean dataLost)
+ {
+ if (dataLost)
+ status = Status.ZAPPED;
+ else
+ status = Status.DOWN;
+ }
+
+ /**
After a Repair, remove all objects.
@return A Set of Copies to be performed to restore this Node.
*/
Set<Copy> reboot(Repair repair)
{
- simulator.print("rebuilds", "reboot: " + this);
simulator.nodes.add(this);
simulator.placer.register(this);
if (status == Status.ZAPPED)
+ {
+ simulator.print("rebuilds", "reboot(zapped): " + this);
damage();
+ }
+ else
+ simulator.print("rebuilds", "reboot(clean): " + this);
status = Status.UP;
Set<Copy> copies = rejoin(repair);
return copies;
@@ -258,16 +276,18 @@ public class Node
*/
int busy()
{
- int r = Bits.nextInt();
+ int r = Bits.nextInt(osd.length);
for (int i = 0; i < osd.length; i++)
- if (osd[(r+i)%osd.length].load == OSD.Load.IDLE)
- return i;
+ {
+ int d = (r+i)%osd.length;
+ if (osd[d].load == OSD.Load.IDLE)
+ return d;
+ }
return -1;
}
/**
Simulate a disk failure.
- Remove data from disks in accordance with Simulator.devicesPerNode.
*/
void damage()
{
@@ -289,10 +309,9 @@ public class Node
*/
boolean contains(BigInteger id)
{
- for (OSD d : osd)
- if (d.containsKey(id))
- return true;
- return false;
+ int i = lookup(id);
+ boolean b = osd[i].containsKey(id);
+ return b;
}
/**
diff --git a/sim/gobs/src/gobs/sim/PrimaryObject.java b/sim/gobs/src/gobs/sim/PrimaryObject.java
index b517a78..375e84e 100644
--- a/sim/gobs/src/gobs/sim/PrimaryObject.java
+++ b/sim/gobs/src/gobs/sim/PrimaryObject.java
@@ -22,7 +22,7 @@ class PrimaryObject
public String toString(Simulator simulator)
{
- return name(simulator) + "[P](" + size + ")";
+ return name(simulator) + "[P](" + File.toString(size) + ")";
}
public String toString()
diff --git a/sim/gobs/src/gobs/sim/Repair.java b/sim/gobs/src/gobs/sim/Repair.java
index 4d2bac3..846e17e 100644
--- a/sim/gobs/src/gobs/sim/Repair.java
+++ b/sim/gobs/src/gobs/sim/Repair.java
@@ -13,12 +13,17 @@ class Repair
List<Copy> entries = new ArrayList<Copy>();
- Repair(Simulator simulator, Node node, double time)
+ Repair(Simulator simulator, Node node,
+ double time, boolean dataLost)
{
super(simulator);
this.node = node;
- double detect = simulator.mttrExponential.nextDouble();
- finish = time+detect;
+ double d;
+ if (dataLost)
+ d = simulator.mttrDiskExponential.nextDouble();
+ else
+ d = simulator.mttrRebootExponential.nextDouble();
+ finish = time+d;
}
String log()
diff --git a/sim/gobs/src/gobs/sim/SecondaryObject.java b/sim/gobs/src/gobs/sim/SecondaryObject.java
index 6757b5e..e43cf74 100644
--- a/sim/gobs/src/gobs/sim/SecondaryObject.java
+++ b/sim/gobs/src/gobs/sim/SecondaryObject.java
@@ -27,7 +27,7 @@ class SecondaryObject
public String toString(Simulator simulator)
{
- return name(simulator) + "[S](" + size + ")";
+ return name(simulator) + "[S](" + File.toString(size) + ")";
}
public String toString()
diff --git a/sim/gobs/src/gobs/sim/Simulator.java b/sim/gobs/src/gobs/sim/Simulator.java
index 6ea3b89..c9d46ba 100644
--- a/sim/gobs/src/gobs/sim/Simulator.java
+++ b/sim/gobs/src/gobs/sim/Simulator.java
@@ -30,9 +30,6 @@ public class Simulator
int reads;
int writes;
- double mttf;
- double mttr;
-
public Placement placer;
public NodeFactory hub;
public FileFactory factory;
@@ -138,11 +135,6 @@ public class Simulator
*/
int devicesPerNode = 1;
- /**
- Fraction of Faults that cause data loss.
- */
- double dataLossFraction = 1;
-
static Simulator current;
static final int maxTries = 10;
@@ -162,6 +154,27 @@ public class Simulator
boolean printAccesses = false;
/**
+ MTTF for all fault types.
+ @see dataLossFraction
+ */
+ double mttf;
+
+ /**
+ Fraction of Faults that cause data loss.
+ */
+ double dataLossFraction = 1;
+
+ /**
+ Time needed to reboot a Node for a non-data-loss crash.
+ */
+ double mttrReboot;
+
+ /**
+ Time needed to insert a replacement disk and reboot a Node.
+ */
+ double mttrDisk;
+
+ /**
Source of exponentially distributed random numbers
for MTTF samples.
*/
@@ -169,9 +182,15 @@ public class Simulator
/**
Source of exponentially distributed random numbers
- for MTTF samples.
+ for MTTR samples for data-loss Faults (disk-replacement).
*/
- Exponential mttrExponential;
+ Exponential mttrDiskExponential;
+
+ /**
+ Source of exponentially distributed random numbers
+ for MTTR samples for non-data-loss Faults (simple reboot).
+ */
+ Exponential mttrRebootExponential;
/**
Time at which this Simulator was initialized:
@@ -314,11 +333,13 @@ public class Simulator
void setupExponentials()
{
- mttf = decimal("mttf");
- mttr = decimal("mttr");
- DRand engine = new DRand(Bits.nextInt());
- mttfExponential = new Exponential(1.0/mttf, engine);
- mttrExponential = new Exponential(1.0/mttr, engine);
+ mttf = decimal("mttf");
+ mttrReboot = decimal("mttr.reboot");
+ mttrDisk = decimal("mttr.disk");
+ DRand engine = new DRand(Bits.nextInt());
+ mttfExponential = new Exponential(1.0/mttf, engine);
+ mttrRebootExponential = new Exponential(1.0/mttrReboot, engine);
+ mttrDiskExponential = new Exponential(1.0/mttrDisk, engine);
}
public static FileFactory setupFileFactory(Properties properties)
@@ -401,6 +422,9 @@ public class Simulator
void initializeNodes()
{
+ devicesPerNode = integer("node.osds");
+ dataLossFraction = decimal("fault.dataloss");
+
hub.generate(N, nodes);
stats.nodes = N;
@@ -410,9 +434,6 @@ public class Simulator
System.out.println("NODES: " + N);
if (bool("print.initialnodes"))
printNodes(nodes);
-
- devicesPerNode = integer("node.osds");
- dataLossFraction = decimal("fault.dataloss");
}
void allocateFiles()
@@ -640,12 +661,15 @@ public class Simulator
void induceFaults()
{
System.out.println("faults: " + totalFaults);
- // Advance to first fault:
Fault fault = new Fault(this);
advanceTo(fault.finish);
while (! complete())
{
Node failed = induceFault(fault);
+ if (nodes.size() == 0)
+ continue;
+ Collection<Copy> fixes = failCopies(failed);
+ todo.addAll(fixes);
Collection<Gob> damaged = failed.collection();
placer.drop(failed);
fault = rebuild(failed, damaged);
@@ -686,7 +710,7 @@ public class Simulator
System.out.println("fault: " + faultCount);
// Schedule the next fault:
Fault fault = new Fault(this);
- Repair repair = new Repair(this, failed, time);
+ Repair repair = new Repair(this, failed, time, fault.dataLost);
Rebuild rebuild = new Rebuild(this, fault, repair);
repair.setRebuild(rebuild);
currentRebuild = rebuild;
@@ -702,15 +726,10 @@ public class Simulator
faultCount++;
int index = Bits.nextInt(nodes.size());
Node failed = nodes.remove(index);
- if (fault.dataLost)
- failed.status = Node.Status.ZAPPED;
- else
- failed.status = Node.Status.DOWN;
+ failed.fail(fault.dataLost);
System.out.println("\nfailed: " + failed.name(this) +
" (" + failed.count() + ")" +
" at: " + Time.toString(time));
- Collection<Copy> fixes = failCopies(failed);
- todo.addAll(fixes);
return failed;
}
@@ -1135,6 +1154,11 @@ public class Simulator
*/
boolean complete()
{
+ if (nodes.size() == 0)
+ {
+ print("NODES_ZERO");
+ return true;
+ }
if (mode == Termination.FAULTS)
return (faultCount >= totalFaults);
else if (mode == Termination.TIME)
diff --git a/sim/gobs/src/gobs/sim/Sites.java b/sim/gobs/src/gobs/sim/Sites.java
index c6ae4d8..e733d84 100644
--- a/sim/gobs/src/gobs/sim/Sites.java
+++ b/sim/gobs/src/gobs/sim/Sites.java
@@ -49,9 +49,21 @@ class Sites
sites.add(node);
}
+ /**
+ Return the Primary or null if this is empty.
+ */
Node primary()
{
- return sites.getLast();
+ Node result;
+ try
+ {
+ result = sites.getLast();
+ }
+ catch (Exception e)
+ {
+ result = null;
+ }
+ return result;
}
Node removePrimary()
diff --git a/sim/gobs/src/gobs/sweep/x/DataLoss02.java b/sim/gobs/src/gobs/sweep/x/DataLoss02.java
index 966029b..80b6941 100755
--- a/sim/gobs/src/gobs/sweep/x/DataLoss02.java
+++ b/sim/gobs/src/gobs/sweep/x/DataLoss02.java
@@ -3,9 +3,7 @@ package gobs.sweep.x;
import java.math.BigInteger;
import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
+import java.util.*;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
@@ -53,7 +51,8 @@ public class DataLoss02
List<String> systems = Tools.list(properties, "systems");
for (String system : systems)
{
- int nodeDevices = Tools.integer(properties, system+".node.osds");
+ int nodeDevices = Tools.integer(properties,
+ system+".node.osds");
String spec = Tools.string(properties, system+".raid");
RAID raid = new RAID(spec, diskSize, diskSpeed);
int nodes = estimateNodes(properties, nodeDevices,
diff --git a/sim/gobs/sweeps/disks-small.cfg b/sim/gobs/sweeps/disks-small.cfg
index 8b2bd3f..f04caba 100644
--- a/sim/gobs/sweeps/disks-small.cfg
+++ b/sim/gobs/sweeps/disks-small.cfg
@@ -2,10 +2,10 @@
mttr = 50
disk.size = 1000000
-disk.speed = 100
+disk.speed = 10000
-disk.mttf.min = 1000
-disk.mttf.max = 2000
+disk.mttf.min = 2000
+disk.mttf.max = 3000
disk.mttf.step = interval:500
systems = san;target
diff --git a/sim/gobs/sweeps/sweep.zsh b/sim/gobs/sweeps/sweep.zsh
index 956491a..25b1ca5 100644
--- a/sim/gobs/sweeps/sweep.zsh
+++ b/sim/gobs/sweeps/sweep.zsh
@@ -6,7 +6,7 @@ GOBS=${SWEEPDIR}/..
source ${SWEEPDIR}/classpath.zsh
source ${SWEEPDIR}/build.zsh
-[[ ${N} == "" ]] && N=2
+[[ ${N} == "" ]] && N=1
start=$( date +%s )
hooks/post-receive
--
Grayskull Repository
1
0
Grayskull Repository branch, master, updated. git-migration-415-g9fac832
by noreply@mcs.anl.gov 19 Feb '10
by noreply@mcs.anl.gov 19 Feb '10
19 Feb '10
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 9fac83298221e0856412602377f05b64ab3fc092 (commit)
via 27d06d37a2d5d3382be6871f89d24658e158cd9b (commit)
via ec0f7b064a7352a35c3bfa98932cca05cfa4bec6 (commit)
via 5e4357613c1d1978897f01a3589b7b622deaa630 (commit)
via 994f3790549f5707da5c4e2dd50e0cc064506330 (commit)
via c8f94bad7e8b36b425390d7d792f6dd2323b19e2 (commit)
via 03b8dd56b695e229db3ee2fee00f227215b9a1a7 (commit)
via 6dd3a3fd8baabf8ba84e5962c417dd6e824a7be4 (commit)
via eb699153594eee969d4f25f4d346aba9d969dff9 (commit)
via 21b6962bb4d2fcf3af23c7b4f79c5c598fb17a8a (commit)
via 84416805da3c14542ab2c7be6d8eb7c67b9ebfba (commit)
via 0e425fe5b7da886f396cfc716aedb689ab631e3c (commit)
via d96b7a29f5ad8f8892c22053b13ba5e264454d8e (commit)
via 77da1635b40952cb82faed3ac257f0e1d596de27 (commit)
via 695c2114576a0f969154a33640cbc57bf0daa1f9 (commit)
via 9e6d3417d9d7d8d08460c96169f6ab5f70ac586c (commit)
via 316910cd1759c3cec061fd524229eac79c510ada (commit)
via 1cd93d2e955a7aeb043293a1e96b86e9ebd5f10e (commit)
via b5ccd8abbdefa6603b63ca04ee37d874fa3eca0e (commit)
via f899624adcc1bb639410131fbe44cedd9be99730 (commit)
from 95e3d4663534a68b1b04cbbd3df9011a4a70dee9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9fac83298221e0856412602377f05b64ab3fc092
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Feb 19 11:46:20 2010 -0600
Bug fixes and tuning for DataLoss02 and dl02-small.
Also EOL fixes. Turned on an Eclipse feature to automate this.
commit 27d06d37a2d5d3382be6871f89d24658e158cd9b
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Fri Feb 19 10:05:31 2010 -0600
Minor changes to support DataLoss02.
commit ec0f7b064a7352a35c3bfa98932cca05cfa4bec6
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:13:37 2010 -0600
Tests for RAID arithmetic.
commit 5e4357613c1d1978897f01a3589b7b622deaa630
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:13:17 2010 -0600
RAID arithmetic.
commit 994f3790549f5707da5c4e2dd50e0cc064506330
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:12:49 2010 -0600
Minor changes.
commit c8f94bad7e8b36b425390d7d792f6dd2323b19e2
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:10:46 2010 -0600
New values() function.
commit 03b8dd56b695e229db3ee2fee00f227215b9a1a7
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:09:42 2010 -0600
Inconsequential plotting changes.
commit 6dd3a3fd8baabf8ba84e5962c417dd6e824a7be4
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Thu Feb 18 20:07:02 2010 -0600
Minor plotting changes.
commit eb699153594eee969d4f25f4d346aba9d969dff9
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:21:36 2010 -0600
Place PDSIFiles on all disks.
Also some minor variable changes.
commit 21b6962bb4d2fcf3af23c7b4f79c5c598fb17a8a
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:11:26 2010 -0600
New tests for DataLoss02, etc.
commit 84416805da3c14542ab2c7be6d8eb7c67b9ebfba
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:10:43 2010 -0600
New data loss test will compare different system configurations.
Not just Node counts.
commit 0e425fe5b7da886f396cfc716aedb689ab631e3c
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:10:16 2010 -0600
Minor fix for API change.
commit d96b7a29f5ad8f8892c22053b13ba5e264454d8e
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:09:00 2010 -0600
Make use of multiple devices per node.
commit 77da1635b40952cb82faed3ac257f0e1d596de27
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 22:07:58 2010 -0600
Start modeling individual devices on a Node.
commit 695c2114576a0f969154a33640cbc57bf0daa1f9
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 15:56:29 2010 -0600
EOL fixes.
commit 9e6d3417d9d7d8d08460c96169f6ab5f70ac586c
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 15:53:08 2010 -0600
Sweep modifications for new tests.
commit 316910cd1759c3cec061fd524229eac79c510ada
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 15:52:20 2010 -0600
Notes-to-self about test organization.
commit 1cd93d2e955a7aeb043293a1e96b86e9ebd5f10e
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 15:51:35 2010 -0600
Change data loss test to report mean time to object loss.
commit b5ccd8abbdefa6603b63ca04ee37d874fa3eca0e
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Wed Feb 17 15:50:54 2010 -0600
Make cfg file syntax slightly more pleasing.
commit f899624adcc1bb639410131fbe44cedd9be99730
Author: U-justinwozniak\wozniak <wozniak(a)JWOZNIAK-DESK.(none)>
Date: Wed Feb 17 14:37:59 2010 -0600
Moving to reusable sweep.zsh .
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/src/gobs/plot/AbstractPlot.java | 33 +++++
sim/gobs/src/gobs/plot/AsciiPlot.java | 4 +-
sim/gobs/src/gobs/plot/MultiplePlot.java | 7 -
sim/gobs/src/gobs/plot/Plot.java | 71 +++++++++-
sim/gobs/src/gobs/sim/Copy.java | 10 ++
sim/gobs/src/gobs/sim/Fault.java | 2 +-
sim/gobs/src/gobs/sim/File.java | 2 +-
sim/gobs/src/gobs/sim/FileFactory.java | 3 +-
sim/gobs/src/gobs/sim/Node.java | 178 +++++++++++++++++++++----
sim/gobs/src/gobs/sim/OSD.java | 26 ++++
sim/gobs/src/gobs/sim/PDSIFiles.java | 41 +++---
sim/gobs/src/gobs/sim/PlainFiles.java | 18 ++-
sim/gobs/src/gobs/sim/RAID.java | 78 +++++++++++
sim/gobs/src/gobs/sim/RandomFiles.java | 29 +++--
sim/gobs/src/gobs/sim/Rebuild.java | 23 +++-
sim/gobs/src/gobs/sim/Simulator.java | 73 ++++++----
sim/gobs/src/gobs/sim/Status.java | 24 ----
sim/gobs/src/gobs/sim/TraceFiles.java | 24 +++-
sim/gobs/src/gobs/sweep/AbstractSweep.java | 17 ++-
sim/gobs/src/gobs/sweep/x/Balance02.java | 4 +-
sim/gobs/src/gobs/sweep/x/DataLoss01.java | 14 +-
sim/gobs/src/gobs/sweep/x/DataLoss02.java | 194 +++++++++++++++++++++++++++
sim/gobs/src/gobs/sweep/x/RAID01.java | 58 ++++++++
sim/gobs/src/gobs/test/TestFileFactory.java | 7 +-
sim/gobs/src/gobs/util/Time.java | 104 +++++++-------
sim/gobs/src/gobs/util/Tools.java | 15 ++
sim/gobs/sweeps/About.txt | 21 +++
sim/gobs/sweeps/classpath.zsh | 4 +-
sim/gobs/sweeps/disks-small.cfg | 23 +++
sim/gobs/sweeps/dl01-medium.cfg | 39 ++++++
sim/gobs/sweeps/dl01-medium.zsh | 9 ++
sim/gobs/sweeps/dl01-small.zsh | 23 +---
sim/gobs/sweeps/dl02-small.cfg | 38 +++++
sim/gobs/sweeps/dl02-small.zsh | 9 ++
sim/gobs/sweeps/faults-range01.cfg | 9 +-
sim/gobs/sweeps/faults-range02.cfg | 11 ++
sim/gobs/sweeps/fs_pdsi_medium.cfg | 11 +-
sim/gobs/sweeps/fs_pdsi_mini.cfg | 2 +
sim/gobs/sweeps/fs_pdsi_small.cfg | 8 +-
sim/gobs/sweeps/raid01.cfg | 10 ++
sim/gobs/sweeps/raid01.zsh | 8 +
sim/gobs/sweeps/sweep.zsh | 27 ++++
sim/gobs/sweeps/system_10-20.cfg | 3 +-
sim/gobs/sweeps/system_30-100.cfg | 12 ++
44 files changed, 1080 insertions(+), 246 deletions(-)
create mode 100755 sim/gobs/src/gobs/plot/AbstractPlot.java
create mode 100755 sim/gobs/src/gobs/sim/OSD.java
create mode 100755 sim/gobs/src/gobs/sim/RAID.java
delete mode 100644 sim/gobs/src/gobs/sim/Status.java
create mode 100755 sim/gobs/src/gobs/sweep/x/DataLoss02.java
create mode 100755 sim/gobs/src/gobs/sweep/x/RAID01.java
create mode 100644 sim/gobs/sweeps/About.txt
create mode 100644 sim/gobs/sweeps/disks-small.cfg
create mode 100644 sim/gobs/sweeps/dl01-medium.cfg
create mode 100755 sim/gobs/sweeps/dl01-medium.zsh
create mode 100644 sim/gobs/sweeps/dl02-small.cfg
create mode 100755 sim/gobs/sweeps/dl02-small.zsh
create mode 100644 sim/gobs/sweeps/faults-range02.cfg
create mode 100644 sim/gobs/sweeps/raid01.cfg
create mode 100755 sim/gobs/sweeps/raid01.zsh
create mode 100644 sim/gobs/sweeps/sweep.zsh
create mode 100644 sim/gobs/sweeps/system_30-100.cfg
Diff of changes:
diff --git a/sim/gobs/src/gobs/plot/AbstractPlot.java b/sim/gobs/src/gobs/plot/AbstractPlot.java
new file mode 100755
index 0000000..be97996
--- /dev/null
+++ b/sim/gobs/src/gobs/plot/AbstractPlot.java
@@ -0,0 +1,33 @@
+package gobs.plot;
+
+import java.awt.Graphics;
+import java.awt.geom.Rectangle2D;
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
+
+public class AbstractPlot
+{
+ static int w = 400;
+ static int h = 400;
+
+ /**
+ Get a writeable EPS file at output.
+ */
+ static EPSDocumentGraphics2D graphics(OutputStream output)
+ throws IOException
+ {
+ EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
+ g2d.setGraphicContext
+ (new org.apache.xmlgraphics.java2d.GraphicContext());
+
+ g2d.setGraphicContext
+ (new org.apache.xmlgraphics.java2d.GraphicContext());
+ g2d.setupDocument(output, w, h);
+
+ return g2d;
+ }
+}
diff --git a/sim/gobs/src/gobs/plot/AsciiPlot.java b/sim/gobs/src/gobs/plot/AsciiPlot.java
index 1841a50..c2522dc 100644
--- a/sim/gobs/src/gobs/plot/AsciiPlot.java
+++ b/sim/gobs/src/gobs/plot/AsciiPlot.java
@@ -15,7 +15,7 @@ import gobs.util.Tools;
public class AsciiPlot
extends Plot
{
- public static void plot(XYSeries series,
+ public static boolean plot(XYSeries series,
String title, String xlabel,
String ylabel, String output)
{
@@ -30,7 +30,9 @@ public class AsciiPlot
catch (IOException e)
{
Tools.bail("AsciiPlot: Output error to: " + output);
+ return false;
}
+ return true;
}
/**
diff --git a/sim/gobs/src/gobs/plot/MultiplePlot.java b/sim/gobs/src/gobs/plot/MultiplePlot.java
index ef9818e..4b2a30a 100644
--- a/sim/gobs/src/gobs/plot/MultiplePlot.java
+++ b/sim/gobs/src/gobs/plot/MultiplePlot.java
@@ -10,8 +10,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.util.*;
-
import org.apache.commons.io.IOUtils;
import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
@@ -19,9 +17,7 @@ import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
-import org.jfree.chart.renderer.xy.XYDotRenderer;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
-import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
@@ -66,9 +62,6 @@ public class MultiplePlot
g2d.setGraphicContext
(new org.apache.xmlgraphics.java2d.GraphicContext());
g2d.setupDocument(out, w, h);
-
- //Paint a bounding box
- // g2d.drawRect(20, 20, 40, 40);
}
catch (IOException e)
{
diff --git a/sim/gobs/src/gobs/plot/Plot.java b/sim/gobs/src/gobs/plot/Plot.java
index 25053dd..685db0f 100644
--- a/sim/gobs/src/gobs/plot/Plot.java
+++ b/sim/gobs/src/gobs/plot/Plot.java
@@ -1,12 +1,73 @@
package gobs.plot;
+import java.awt.Color;
+import java.awt.geom.Rectangle2D;
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
-abstract class Plot
+public class Plot
+ extends AbstractPlot
{
- static void plot(XYSeries series,
- String title, String xlabel,
- String ylabel, String output)
- {}
+ public static boolean plot(XYSeries series,
+ String title, String xlabel,
+ String ylabel, String output)
+ {
+ XYSeriesCollection collection = new XYSeriesCollection();
+ collection.addSeries(series);
+
+ EPSDocumentGraphics2D g2d = null;
+ OutputStream out = null;
+ Rectangle2D.Double rectangle = new Rectangle2D.Double(0, 0, w, h);
+
+ try
+ {
+ out = new FileOutputStream(output);
+ out = new BufferedOutputStream(out);
+ g2d = graphics(out);
+ }
+ catch (IOException e)
+ {
+ System.out.println("Problem with file: " + output);
+ return false;
+ }
+
+ final boolean withLegend = true;
+ JFreeChart chart =
+ ChartFactory.createXYLineChart
+ (title, xlabel, ylabel, collection,
+ PlotOrientation.VERTICAL, withLegend, false, false);
+
+ XYLineAndShapeRenderer renderer =
+ new XYLineAndShapeRenderer();
+ XYPlot plot = chart.getXYPlot();
+ plot.setBackgroundPaint(Color.WHITE);
+ plot.setRenderer(renderer);
+ chart.draw(g2d, rectangle);
+
+ try
+ {
+ g2d.finish();
+ IOUtils.closeQuietly(out);
+ }
+ catch (Exception e)
+ {
+ System.out.println("Err!");
+ }
+
+ System.out.println("PLOTTED: " + output);
+ return true;
+ }
}
diff --git a/sim/gobs/src/gobs/sim/Copy.java b/sim/gobs/src/gobs/sim/Copy.java
index 6e3c6e7..9343bc0 100644
--- a/sim/gobs/src/gobs/sim/Copy.java
+++ b/sim/gobs/src/gobs/sim/Copy.java
@@ -18,6 +18,11 @@ class Copy
Progress progress;
+ /**
+ Index of OSD on which this payload will be placed.
+ */
+ int index = -1;
+
static DecimalFormat df = new DecimalFormat("0.00");
Copy(Simulator simulator, Cause cause,
@@ -50,6 +55,11 @@ class Copy
Tools.bail("Copy.startAt(): Copy is DONE: " + log());
}
+ void index(int i)
+ {
+ index = i;
+ }
+
public String toString()
{
return log();
diff --git a/sim/gobs/src/gobs/sim/Fault.java b/sim/gobs/src/gobs/sim/Fault.java
index dd4440d..4451f06 100644
--- a/sim/gobs/src/gobs/sim/Fault.java
+++ b/sim/gobs/src/gobs/sim/Fault.java
@@ -17,7 +17,7 @@ class Fault
super(simulator);
finish = simulator.time() +
simulator.pullFault();
- if (Bits.nextDouble() < Simulator.dataLossFraction)
+ if (Bits.nextDouble() < simulator.dataLossFraction)
dataLost = true;
}
diff --git a/sim/gobs/src/gobs/sim/File.java b/sim/gobs/src/gobs/sim/File.java
index 938b0b2..6445544 100644
--- a/sim/gobs/src/gobs/sim/File.java
+++ b/sim/gobs/src/gobs/sim/File.java
@@ -93,7 +93,7 @@ public class File
sb.append(")");
}
- static String toString(BigInteger b)
+ public static String toString(BigInteger b)
{
if (b.compareTo(FileFactory.TB) > 0)
return "" + b.divide(FileFactory.TB) + "TB";
diff --git a/sim/gobs/src/gobs/sim/FileFactory.java b/sim/gobs/src/gobs/sim/FileFactory.java
index 4f42af4..724c823 100644
--- a/sim/gobs/src/gobs/sim/FileFactory.java
+++ b/sim/gobs/src/gobs/sim/FileFactory.java
@@ -10,7 +10,8 @@ import static java.lang.Math.*;
public abstract class FileFactory
{
- abstract File get();
+ public abstract File get();
+ public abstract BigInteger getSize();
// Some reusable numbers:
diff --git a/sim/gobs/src/gobs/sim/Node.java b/sim/gobs/src/gobs/sim/Node.java
index 3f85591..c1c98bf 100644
--- a/sim/gobs/src/gobs/sim/Node.java
+++ b/sim/gobs/src/gobs/sim/Node.java
@@ -19,7 +19,7 @@ public class Node
/**
Object store.
*/
- public Map<BigInteger,Gob> objects;
+ public OSD[] osd;
/**
Counter for number of pushes during rebuilds.
@@ -44,18 +44,52 @@ public class Node
{
super(id);
this.simulator = simulator;
- objects = new LinkedHashMap<BigInteger,Gob>();
+
+ osd = new OSD[simulator.devicesPerNode];
+ for (int i = 0; i < simulator.devicesPerNode; i++)
+ osd[i] = new OSD();
+ }
+
+ enum Status
+ {
+ /**
+ Normal operation
+ */
+ UP,
+
+ /**
+ Node is not available
+ */
+ DOWN,
+
+ /**
+ Node is down and will come back with missing data
+ */
+ ZAPPED
}
void add(Gob object)
{
assert(object != null);
- Tools.check(! objects.containsKey(object.id),
+ Tools.check(! contains(object.id),
"Node.add(): " + id + " contains " +
object.toString(Simulator.current) + "\n" +
displayObjects());
- objects.put(object.id, object);
+ int r = Bits.nextInt(simulator.devicesPerNode);
+ osd[r].put(object.id, object);
+ }
+
+ /**
+ Return the index of the OSD that serves id.
+ If not found, return -1.
+ */
+ int lookup(BigInteger id)
+ {
+ for (int i = 0; i < osd.length; i++)
+ if (osd[i].containsKey(id))
+ return i;
+ return -1;
}
/**
@@ -63,7 +97,10 @@ public class Node
*/
Gob get(BigInteger id)
{
- return objects.get(id);
+ for (OSD d : osd)
+ if (d.containsKey(id))
+ return d.get(id);
+ return null;
}
/**
@@ -71,7 +108,10 @@ public class Node
*/
Gob remove(BigInteger id)
{
- return objects.remove(id);
+ for (OSD d : osd)
+ if (d.containsKey(id))
+ return d.remove(id);
+ return null;
}
/**
@@ -88,9 +128,24 @@ public class Node
/**
Return a Collection of all of this Node's objects.
*/
+ public Collection<BigInteger> keys()
+ {
+ Collection<BigInteger> result =
+ new ArrayList<BigInteger>(count());
+ for (OSD d : osd)
+ result.addAll(d.keySet());
+ return result;
+ }
+
+ /**
+ Return a Collection of all of this Node's objects.
+ */
public Collection<Gob> collection()
{
- return objects.values();
+ Collection<Gob> result = new ArrayList<Gob>(count());
+ for (OSD d : osd)
+ result.addAll(d.values());
+ return result;
}
/**
@@ -124,7 +179,7 @@ public class Node
if (! simulator.placer.share(this, other))
continue;
- Collection<Gob> objects = other.objects.values();
+ Collection<Gob> objects = other.collection();
for (Gob object : objects)
{
Sites sites = simulator.placer.sites(object);
@@ -149,22 +204,84 @@ public class Node
}
/**
+ Start using this Node as a Copy source.
+ */
+ void startStreamFrom(Copy copy)
+ {
+ int i = lookup(copy.object.id);
+ assert(osd[i].load == OSD.Load.IDLE);
+ osd[i].load = OSD.Load.BUSY;
+ }
+
+ /**
+ Start using this Node as a Copy sink.
+ */
+ void startStreamTo(Copy copy)
+ {
+ assert(osd[copy.index].load == OSD.Load.IDLE);
+ osd[copy.index].load = OSD.Load.BUSY;
+ }
+
+ /**
+ Start using this Node as a Copy source.
+ */
+ void stopStreamFrom(Copy copy)
+ {
+ int i = lookup(copy.object.id);
+ assert(osd[i].load == OSD.Load.BUSY);
+ osd[i].load = OSD.Load.IDLE;
+ }
+
+ /**
+ Start using this Node as a Copy sink.
+ */
+ void stopStreamTo(Copy copy)
+ {
+ assert(osd[copy.index].load == OSD.Load.BUSY);
+ osd[copy.index].load = OSD.Load.IDLE;
+ }
+
+ /**
+ Is the OSD serving Gob with id busy?
+ */
+ boolean busy(BigInteger id)
+ {
+ int i = lookup(id);
+ assert(i >= 0);
+ return (osd[i].load == OSD.Load.BUSY);
+ }
+
+ /**
+ Does this Node have an OSD available for a write?
+ If yes, return the index of that OSD.
+ Else, return -1.
+ */
+ int busy()
+ {
+ int r = Bits.nextInt();
+ for (int i = 0; i < osd.length; i++)
+ if (osd[(r+i)%osd.length].load == OSD.Load.IDLE)
+ return i;
+ return -1;
+ }
+
+ /**
Simulate a disk failure.
- Remove data from disks in accordance with Simulator.disksPerNode.
+ Remove data from disks in accordance with Simulator.devicesPerNode.
*/
void damage()
{
- if (Simulator.disksPerNode == 1)
- {
- objects.clear();
- return;
- }
+ int r = Bits.nextInt(simulator.devicesPerNode);
+ osd[r].clear();
+ }
- double r = 1 / Simulator.disksPerNode;
- for (Iterator<Gob> it = objects.values().iterator();
- it.hasNext(); )
- if (Bits.nextDouble() < r)
- it.remove();
+ /**
+ Remove data from all OSDs.
+ */
+ void clear()
+ {
+ for (OSD d : osd)
+ d.clear();
}
/**
@@ -172,7 +289,10 @@ public class Node
*/
boolean contains(BigInteger id)
{
- return objects.containsKey(id);
+ for (OSD d : osd)
+ if (d.containsKey(id))
+ return true;
+ return false;
}
/**
@@ -191,7 +311,7 @@ public class Node
String loadReport(int B)
{
- return bitString(B) + " " + objects.size();
+ return bitString(B) + " " + count();
}
public String displayObjects()
@@ -201,12 +321,12 @@ public class Node
public String displayObjects(Simulator simulator)
{
- StringBuffer result = new StringBuffer(objects.size()*32);
+ StringBuffer result = new StringBuffer(count()*32);
result.append(name(simulator));
result.append(":\t");
- for (BigInteger i : objects.keySet())
+ for (BigInteger i : keys())
{
- Gob object = objects.get(i);
+ Gob object = get(i);
result.append(object.toString(simulator)).append(" ");
}
result.append("\n");
@@ -220,7 +340,7 @@ public class Node
public String displayNeighbors(Simulator simulator)
{
- StringBuffer result = new StringBuffer(objects.size()*32);
+ StringBuffer result = new StringBuffer(count()*32);
result.append("NEIGHBORS: ").append(name(simulator));
for (Node node : neighbors)
@@ -229,6 +349,14 @@ public class Node
return result.toString();
}
+ public int count()
+ {
+ int result = 0;
+ for (OSD d : osd)
+ result += d.size();
+ return result;
+ }
+
public String toString(Simulator simulator)
{
return name(simulator);
diff --git a/sim/gobs/src/gobs/sim/OSD.java b/sim/gobs/src/gobs/sim/OSD.java
new file mode 100755
index 0000000..0442a4c
--- /dev/null
+++ b/sim/gobs/src/gobs/sim/OSD.java
@@ -0,0 +1,26 @@
+package gobs.sim;
+
+import java.math.BigInteger;
+import java.util.LinkedHashMap;
+
+/**
+ Simulate a disk or RAID array.
+ */
+public class OSD extends LinkedHashMap<BigInteger,Gob>
+{
+ Status status = Status.UP;
+
+ Load load = Load.IDLE;
+
+ enum Load
+ {
+ IDLE, BUSY
+ }
+
+ enum Status
+ {
+ UP, DOWN, LOCALREBUILD
+ }
+
+ static final long serialVersionUID = 1;
+}
diff --git a/sim/gobs/src/gobs/sim/PDSIFiles.java b/sim/gobs/src/gobs/sim/PDSIFiles.java
index d25ce60..4f860ca 100644
--- a/sim/gobs/src/gobs/sim/PDSIFiles.java
+++ b/sim/gobs/src/gobs/sim/PDSIFiles.java
@@ -36,8 +36,6 @@ public class PDSIFiles
*/
static Pattern pattern = Pattern.compile("[a-zA-Z]");
- public Simulator simulator;
-
/**
Clone of original data points.
*/
@@ -53,18 +51,24 @@ public class PDSIFiles
*/
double[] m;
+ int nodes = -1;
+
+ int disksPerNode = 0;
+
/**
Obtain file distribution by interpolating points.
- @param simulator Required only to get node count
@param points points(i,j) indicates that fraction i
has size below j
*/
- public PDSIFiles(Simulator simulator, double[][] points)
+ public PDSIFiles(Properties properties, double[][] points)
{
- this.simulator = simulator;
-
this.points = copy2s(points);
+ if (Tools.has(properties, "node.count"))
+ nodes = Tools.integer(properties, "node.count");
+ if (Tools.has(properties, "node.osds"))
+ disksPerNode = Tools.integer(properties, "node.osds");
+
interpolate();
}
@@ -74,9 +78,10 @@ public class PDSIFiles
@param simulator Required only to get node count and property
@see #parse
*/
- public PDSIFiles(Simulator simulator)
+ public PDSIFiles(Properties properties)
{
- this(simulator, parse(simulator.string("file.pdsi.points")));
+ this(properties,
+ parse(Tools.string(properties, "file.pdsi.points")));
}
/**
@@ -195,7 +200,10 @@ public class PDSIFiles
*/
public File get()
{
- BigInteger size = randomSize();
+ if (nodes < 0)
+ Tools.bail("PDSIFiles not set up properly!");
+
+ BigInteger size = getSize();
int width;
BigInteger strip;
@@ -204,9 +212,9 @@ public class PDSIFiles
{
BigInteger fourMB = MB.multiply(BigInteger.valueOf(4));
BigInteger blocks = size.divide(fourMB).add(BigInteger.ONE);
- BigInteger bigNodes =
- BigInteger.valueOf(simulator.nodes.size());
- BigInteger bigWidth = blocks.min(bigNodes);
+ int disks = nodes * disksPerNode;
+ BigInteger bigDisks = BigInteger.valueOf(disks);
+ BigInteger bigWidth = blocks.min(bigDisks);
width = bigWidth.intValue();
strip = fourMB;
replicas = 3;
@@ -221,10 +229,9 @@ public class PDSIFiles
return new File(size, strip, width, replicas);
}
- BigInteger randomSize()
+ public BigInteger getSize()
{
double d = Bits.nextDouble();
-
return eval(d);
}
@@ -285,10 +292,8 @@ public class PDSIFiles
BigInteger n = new BigInteger(args[0]);
Bits.init();
- Simulator simulator = new Simulator();
- simulator.nodes = new ArrayList<Node>();
- simulator.nodes.add(null);
+ Properties properties = new Properties();
double[][] points = new double[5][2];
points[0][0] = 0.2;
@@ -302,7 +307,7 @@ public class PDSIFiles
points[4][0] = 1.0;
points[4][1] = 1024.0*1024*1024*1024;
- PDSIFiles factory = new PDSIFiles(simulator, points);
+ PDSIFiles factory = new PDSIFiles(properties, points);
// generateCount(n);
generateBytes(factory, n);
diff --git a/sim/gobs/src/gobs/sim/PlainFiles.java b/sim/gobs/src/gobs/sim/PlainFiles.java
index 344f9ed..ee508db 100644
--- a/sim/gobs/src/gobs/sim/PlainFiles.java
+++ b/sim/gobs/src/gobs/sim/PlainFiles.java
@@ -1,7 +1,10 @@
package gobs.sim;
+import gobs.util.Tools;
+
import java.math.BigInteger;
+import java.util.Properties;
/**
* Generates same file repeatedly.
@@ -18,16 +21,21 @@ class PlainFiles
int width;
int replicas;
- PlainFiles(Simulator simulator)
+ PlainFiles(Properties properties)
{
- size = simulator.bigInteger("file.size");
- strip = simulator.bigInteger("file.strip");
- width = simulator.integer("file.width");
- replicas = simulator.integer("file.replicas");
+ size = Tools.bigInteger(properties, "file.size");
+ strip = Tools.bigInteger(properties, "file.strip");
+ width = Tools.integer(properties,"file.width");
+ replicas = Tools.integer(properties, "file.replicas");
}
public File get()
{
return new File(size, strip, width, replicas);
}
+
+ public BigInteger getSize()
+ {
+ return size;
+ }
}
diff --git a/sim/gobs/src/gobs/sim/RAID.java b/sim/gobs/src/gobs/sim/RAID.java
new file mode 100755
index 0000000..07bf8ae
--- /dev/null
+++ b/sim/gobs/src/gobs/sim/RAID.java
@@ -0,0 +1,78 @@
+
+package gobs.sim;
+
+import gobs.util.Tools;
+
+public class RAID
+{
+ int data, parity;
+ String spec;
+
+ double size = -1;
+ double speed;
+
+ public RAID(String spec)
+ {
+ this.spec = spec;
+ scan(spec);
+ }
+
+ public RAID(String spec, double size, double speed)
+ {
+ this(spec);
+ this.size = size;
+ this.speed = speed;
+ }
+
+ public double computeMTTF(double mttf)
+ {
+ if (size < 0)
+ Tools.bail("RAID not set up properly!");
+ return computeMTTF(size, speed, mttf);
+ }
+
+ public double computeMTTF(double diskSize, double diskSpeed,
+ double mttf)
+ {
+ double mttr = diskSize/diskSpeed;
+ return computeMTTF(data, parity, mttf, mttr);
+ }
+
+ public static double computeMTTF(int data, int parity,
+ double mttf, double mttr)
+ {
+ double result = 0;
+
+ if (parity == 0)
+ {
+ result = mttf/data;
+ }
+ else
+ {
+ result =
+ computeMTTF(data, parity-1, mttf, mttr) *
+ mttf/((data+parity)*mttr);
+ }
+
+ return result;
+ }
+
+ public void scan(String input)
+ {
+ int i = input.indexOf("+");
+ String s1 = input.substring(0, i);
+ data = Integer.parseInt(s1);
+ String s2 = input.substring(i+1);
+ parity = Integer.parseInt(s2);
+ }
+
+ public int data()
+ {
+ return data;
+ }
+
+ public String toString()
+ {
+ return spec;
+ }
+}
diff --git a/sim/gobs/src/gobs/sim/RandomFiles.java b/sim/gobs/src/gobs/sim/RandomFiles.java
index a411c2b..992c806 100644
--- a/sim/gobs/src/gobs/sim/RandomFiles.java
+++ b/sim/gobs/src/gobs/sim/RandomFiles.java
@@ -2,8 +2,10 @@
package gobs.sim;
import java.math.BigInteger;
+import java.util.Properties;
import gobs.util.Bits;
+import gobs.util.Tools;
/**
* Generates random files.
@@ -39,14 +41,14 @@ class RandomFiles
fourMB = BigInteger.valueOf(2).multiply(BigInteger.valueOf(mbl));
}
- RandomFiles(Simulator simulator)
+ RandomFiles(Properties properties)
{
- sizebigmax = simulator.bigInteger("filebigmax");
- sizebigmin = simulator.bigInteger("filebigmin");
- sizesmallmax = simulator.bigInteger("filesmallmax");
- sizesmallmin = simulator.bigInteger("filesmallmin");
- strip = simulator.bigInteger("filestrip");
- width = simulator.integer("filewidth");
+ sizebigmax = Tools.bigInteger(properties, "filebigmax");
+ sizebigmin = Tools.bigInteger(properties, "filebigmin");
+ sizesmallmax = Tools.bigInteger(properties, "filesmallmax");
+ sizesmallmin = Tools.bigInteger(properties, "filesmallmin");
+ strip = Tools.bigInteger(properties, "filestrip");
+ width = Tools.integer(properties, "filewidth");
}
public File get()
@@ -56,10 +58,7 @@ class RandomFiles
if (Bits.nextBoolean())
{
// Big file:
- size =
- Bits.nextBigInteger(sizebigmax.subtract(sizebigmin))
- .add(sizebigmin);
-
+ size = getSize();
result = new File(size, fourMB, width, 2);
}
else
@@ -72,4 +71,12 @@ class RandomFiles
}
return result;
}
+
+ public BigInteger getSize()
+ {
+ BigInteger size =
+ Bits.nextBigInteger(sizebigmax.subtract(sizebigmin))
+ .add(sizebigmin);
+ return size;
+ }
}
diff --git a/sim/gobs/src/gobs/sim/Rebuild.java b/sim/gobs/src/gobs/sim/Rebuild.java
index 68f7f14..64bdfc2 100644
--- a/sim/gobs/src/gobs/sim/Rebuild.java
+++ b/sim/gobs/src/gobs/sim/Rebuild.java
@@ -61,6 +61,11 @@ public class Rebuild
List<Copy> entries = new ArrayList<Copy>();
/**
+ True if data was lost during this Rebuild.
+ */
+ boolean dataLost = false;
+
+ /**
@param fault The fault that may interrupt this Rebuild.
*/
Rebuild(Simulator simulator, Fault fault, Repair repair)
@@ -100,7 +105,8 @@ public class Rebuild
}
}
finish = simulator.time();
- simulator.print("rebuilds", "REBUILD_TIME: " + Time.toString(finish-start));
+ simulator.print("rebuilds", "REBUILD_TIME: " +
+ Time.toString(finish-start));
return finish;
}
@@ -111,8 +117,8 @@ public class Rebuild
{
simulator.todo.remove(copy);
copy.startAt(time);
- simulator.busy.add(copy.source);
- simulator.busy.add(copy.destination);
+ copy.source.startStreamFrom(copy);
+ copy.destination.startStreamTo(copy);
Tools.check(simulator.inflight.add(copy),
"Could not add to inflight!");
}
@@ -155,8 +161,8 @@ public class Rebuild
*/
void completeCopy(Copy copy)
{
- simulator.busy.remove(copy.source);
- simulator.busy.remove(copy.destination);
+ copy.source.stopStreamFrom(copy);
+ copy.destination.stopStreamTo(copy);
simulator.placer.copy(copy);
List<Copy> extras = validate(copy.object, copy.destination);
add(extras);
@@ -474,9 +480,12 @@ public class Rebuild
simulator.todo.remove(copy);
continue;
}
- if (! (simulator.busy.contains(copy.source) ||
- simulator.busy.contains(copy.destination)))
+ if (copy.source.busy(copy.object.id))
+ continue;
+ int b = copy.destination.busy();
+ if (b >= 0)
{
+ copy.index(b);
it.remove();
return copy;
}
diff --git a/sim/gobs/src/gobs/sim/Simulator.java b/sim/gobs/src/gobs/sim/Simulator.java
index 7313da6..6ea3b89 100644
--- a/sim/gobs/src/gobs/sim/Simulator.java
+++ b/sim/gobs/src/gobs/sim/Simulator.java
@@ -100,17 +100,17 @@ public class Simulator
/**
Rebuild rate in bytes/sec.
*/
- static double rebuildRate = 0;
+ double rebuildRate = 0;
/**
Rebuild rate in bytes/sec.
*/
- private static BigInteger bigRebuildRate = null;
+ private BigInteger bigRebuildRate = null;
/**
- The Set of Nodes that are currently making copies.
+ Store how many transfers the Node is involved in.
*/
- Set<Node> busy = new HashSet<Node>();
+ Map<Node,Integer> busy = new HashMap<Node,Integer>();
/**
Copies that the Simulator will perform in the future.
@@ -136,22 +136,23 @@ public class Simulator
/**
Disks per node.
*/
- static int disksPerNode = 1;
+ int devicesPerNode = 1;
/**
Fraction of Faults that cause data loss.
*/
- static double dataLossFraction = 1;
+ double dataLossFraction = 1;
static Simulator current;
static final int maxTries = 10;
- DecimalFormat df = new DecimalFormat("0.00");
+ static DecimalFormat df = new DecimalFormat("0.00");
+ static DecimalFormat ff = new DecimalFormat("0");
/**
Format for timestamps (simulation time).
*/
- DecimalFormat tf = new DecimalFormat("0");
+ static DecimalFormat tf = new DecimalFormat("0");
public Statistics stats = new Statistics();
@@ -273,7 +274,7 @@ public class Simulator
printProperties();
setupBasics();
- setupFileFactory();
+ factory = setupFileFactory(properties);
setupPlacement();
setupNodes();
}
@@ -281,7 +282,7 @@ public class Simulator
void setupBasics()
{
B = integer("B");
- N = integer("nodes");
+ N = integer("node.count");
fileCount = integer("files");
reads = integer("read.count");
writes = integer("write.count");
@@ -320,21 +321,22 @@ public class Simulator
mttrExponential = new Exponential(1.0/mttr, engine);
}
- void setupFileFactory()
+ public static FileFactory setupFileFactory(Properties properties)
{
+ FileFactory factory = null;
try
{
String factoryName = properties.getProperty("impl.filefactory");
if (factoryName == null)
bail("No impl.filefactory given!");
else if (factoryName.equals("PlainFiles"))
- factory = new PlainFiles(this);
+ factory = new PlainFiles(properties);
else if (factoryName.equals("TraceFiles"))
- factory = new TraceFiles(this);
+ factory = new TraceFiles(properties);
else if (factoryName.equals("RandomFiles"))
- factory = new RandomFiles(this);
+ factory = new RandomFiles(properties);
else if (factoryName.equals("PDSIFiles"))
- factory = new PDSIFiles(this);
+ factory = new PDSIFiles(properties);
else
bail("Bad filefactory name: " + factoryName);
}
@@ -342,6 +344,7 @@ public class Simulator
{
Tools.bail("Error setting up FileFactory:\n" + e.getMessage());
}
+ return factory;
}
void setupPlacement()
@@ -408,7 +411,7 @@ public class Simulator
if (bool("print.initialnodes"))
printNodes(nodes);
- disksPerNode = integer("node.diskspernode");
+ devicesPerNode = integer("node.osds");
dataLossFraction = decimal("fault.dataloss");
}
@@ -482,7 +485,7 @@ public class Simulator
Map<Node,Integer> result = new Hashtable<Node,Integer>();
for (Node node : nodes)
- result.put(node, node.objects.size());
+ result.put(node, node.count());
return result;
}
@@ -700,11 +703,11 @@ public class Simulator
int index = Bits.nextInt(nodes.size());
Node failed = nodes.remove(index);
if (fault.dataLost)
- failed.status = Status.ZAPPED;
+ failed.status = Node.Status.ZAPPED;
else
- failed.status = Status.DOWN;
+ failed.status = Node.Status.DOWN;
System.out.println("\nfailed: " + failed.name(this) +
- " (" + failed.objects.size() + ")" +
+ " (" + failed.count() + ")" +
" at: " + Time.toString(time));
Collection<Copy> fixes = failCopies(failed);
todo.addAll(fixes);
@@ -802,7 +805,6 @@ public class Simulator
void completeRebuild()
{
rebuilds.add(currentRebuild);
- currentRebuild = null;
if (string("print.nodes").equals("true"))
printNodeObjects(nodes);
}
@@ -866,15 +868,28 @@ public class Simulator
computeAccesses();
computeUserPerformance();
computeTraffic();
-
- stats.results.setProperty("lostObjects",
- df.format(stats.lostObjects));
+ computeLosses();
System.out.println("FINAL_NODES: " + nodes.size());
System.out.println("FLEXIBILITIES: " +
df.format(stats.avgFlexibility()));
- System.out.println("LOST_OBJECTS: " + stats.lostObjects);
System.out.println("FINAL_OBJECTS: " + countObjects());
+
+ System.out.println("SIMULATED_TIME: " + Time.toString(time));
+
+ stats.results.setProperty("time", df.format(time));
+ }
+
+ void computeLosses()
+ {
+ int count = 0;
+ for (Rebuild rebuild : rebuilds)
+ if (rebuild.dataLost)
+ count++;
+
+ System.out.println("LOST_OBJECTS: " + lost.size());
+ stats.results.setProperty("lost", ff.format(lost.size()));
+ stats.results.setProperty("failures", ff.format(count));
}
/**
@@ -1103,7 +1118,7 @@ public class Simulator
{
int count = 0;
for (Node node : nodes)
- count += node.objects.size();
+ count += node.count();
return count;
}
@@ -1112,7 +1127,7 @@ public class Simulator
// new Exception().printStackTrace();
System.out.println("LOST: " + object.toString(this));
lost.add(object.id);
- stats.lostObjects++;
+ currentRebuild.dataLost = true;
}
/**
@@ -1150,7 +1165,7 @@ public class Simulator
Map<BigInteger,Integer> count = new HashMap<BigInteger,Integer>();
for (Node node : nodes)
{
- for (BigInteger id: node.objects.keySet())
+ for (BigInteger id: node.keys())
{
int c;
Integer C = count.get(id);
@@ -1235,7 +1250,7 @@ public class Simulator
{
System.out.println("FREE:");
for (Node node : nodes)
- node.objects.clear();
+ node.clear();
files.clear();
objects.clear();
nodes.clear();
diff --git a/sim/gobs/src/gobs/sim/Status.java b/sim/gobs/src/gobs/sim/Status.java
deleted file mode 100644
index 9ffc2a8..0000000
--- a/sim/gobs/src/gobs/sim/Status.java
+++ /dev/null
@@ -1,24 +0,0 @@
-
-package gobs.sim;
-
-/**
- Node status.
-*/
-
-enum Status
-{
- /**
- Normal operation
- */
- UP,
-
- /**
- Node is not available
- */
- DOWN,
-
- /**
- Node is down and will come back with missing data
- */
- ZAPPED
-}
diff --git a/sim/gobs/src/gobs/sim/TraceFiles.java b/sim/gobs/src/gobs/sim/TraceFiles.java
index 34bc725..c7a8782 100644
--- a/sim/gobs/src/gobs/sim/TraceFiles.java
+++ b/sim/gobs/src/gobs/sim/TraceFiles.java
@@ -3,6 +3,7 @@ package gobs.sim;
import java.math.BigInteger;
import java.util.List;
+import java.util.Properties;
import gobs.util.*;
@@ -27,16 +28,16 @@ class TraceFiles
List<String> lines = null;
int index = 0;
- Simulator simulator;
+ int nodes = 0;
/**
Opens trace file based on Simulator property filetrace.
Maintains an internal list of lines generated by LineReader.
*/
- TraceFiles(Simulator simulator)
+ TraceFiles(Properties properties)
{
- this.simulator = simulator;
- filename = simulator.string("filetrace");
+ filename = Tools.string(properties, "filetrace");
+ nodes = Tools.integer(properties, "nodes");
try
{
lines = LineReader.read(new java.io.File(filename));
@@ -49,7 +50,6 @@ class TraceFiles
Tools.bail("TraceFiles: Could not read: \"" +
filename + "\"");
}
- simulator.fileCount = lines.size();
}
/**
@@ -80,9 +80,9 @@ class TraceFiles
replicas = Integer.parseInt(tokens[4]);
w = tokens[3];
if (w.equals("MAX"))
- width = simulator.N;
+ width = nodes;
else if (w.equals("OPT"))
- width = simulator.N/replicas;
+ width = nodes/replicas;
else
width = Integer.parseInt(w);
}
@@ -97,4 +97,14 @@ class TraceFiles
return new File(size, strip, width, replicas);
}
+
+ /**
+ Does not advance the index into the file.
+ */
+ public BigInteger getSize()
+ {
+ String[] tokens = LineReader.tokenize(lines.get(index));
+ BigInteger size = new BigInteger(tokens[1]);
+ return size;
+ }
}
diff --git a/sim/gobs/src/gobs/sweep/AbstractSweep.java b/sim/gobs/src/gobs/sweep/AbstractSweep.java
index af118a8..144b13a 100644
--- a/sim/gobs/src/gobs/sweep/AbstractSweep.java
+++ b/sim/gobs/src/gobs/sweep/AbstractSweep.java
@@ -96,6 +96,15 @@ public abstract class AbstractSweep
path = p;
}
+ /**
+ Split on semicolon.
+ */
+ public static List<String> values(String text)
+ {
+ List<String> result = Tools.stringToList(text);
+ return result;
+ }
+
public static List<String> values(String step, int min, int max)
{
if (step.equals("all"))
@@ -200,12 +209,12 @@ public abstract class AbstractSweep
/**
Sweep over all integer values between min and max
stepping over the interval argument.
- @param arg The argument, e.g., "interval_4".
+ @param arg The argument, e.g., "interval:4".
@return The list, e.g., min, min+4, min+8, max.
*/
static List<String> interval(String arg, int min, int max)
{
- String[] tokens = arg.split("_");
+ String[] tokens = arg.split(":");
int interval = 0;
try
@@ -236,12 +245,12 @@ public abstract class AbstractSweep
/**
Sweep over all integer values given by the literal.
Ignores min and max.
- @param arg The argument, e.g., "literal_2,4,5".
+ @param arg The argument, e.g., "literal:2,4,5".
@return The list, e.g., 2,4,5.
*/
static List<String> literal(String arg)
{
- int p = arg.indexOf("_");
+ int p = arg.indexOf(":");
String vals = arg.substring(p+1);
String[] tokens = vals.split(",");
diff --git a/sim/gobs/src/gobs/sweep/x/Balance02.java b/sim/gobs/src/gobs/sweep/x/Balance02.java
index 3b35272..307a8e7 100644
--- a/sim/gobs/src/gobs/sweep/x/Balance02.java
+++ b/sim/gobs/src/gobs/sweep/x/Balance02.java
@@ -37,7 +37,7 @@ class Balance02
int i = 0;
for (Node node : simulator.nodes)
{
- series.add(i++, node.objects.size());
+ series.add(i++, node.count());
Node closestNode = null;
BigInteger closestDistance = simulator.M;
@@ -57,7 +57,7 @@ class Balance02
System.out.println
("i: " + i +
" node: " + node +
- " load: " + node.objects.size() +
+ " load: " + node.count() +
"\n\t distance: " + closestDistance);
}
diff --git a/sim/gobs/src/gobs/sweep/x/DataLoss01.java b/sim/gobs/src/gobs/sweep/x/DataLoss01.java
index 533ff5d..58b3f88 100644
--- a/sim/gobs/src/gobs/sweep/x/DataLoss01.java
+++ b/sim/gobs/src/gobs/sweep/x/DataLoss01.java
@@ -76,7 +76,8 @@ class DataLoss01
collection.addSeries(series);
MultiplePlot.plot(collection, "",
- "MTTF", "objects", output);
+ "Mean Time to Disk Failure",
+ "Mean Time to Object Loss", output);
// AsciiPlot.plot(pSweep.series, "Maximum Rebuild Load",
// "nodes", "load", "tmp.txt");
@@ -97,19 +98,20 @@ class DataLoss01
XYSeries series = new XYSeries(label + " N=" + nodes);
for (String mttf : valuesMTTF)
{
- double losses = 0.0;
+ double time = 0.0;
+ int lost = 0;
double total = 0.0;
for (Simulator simulator : sweep.sims.values())
- {
if (simulator.string("nodes").equals(nodes) &&
simulator.string("mttf").equals(mttf))
{
System.out.println(simulator.string("tag"));
- losses += simulator.stats.lostObjects;
+ time += Tools.decimal(simulator.stats.results, "time");
+ lost += Tools.integer(simulator.stats.results, "lost");
total++;
}
- }
- series.add(Integer.parseInt(mttf), losses/total);
+ if (lost > 0)
+ series.add(Integer.parseInt(mttf), time/lost);
}
results.add(series);
}
diff --git a/sim/gobs/src/gobs/sweep/x/DataLoss02.java b/sim/gobs/src/gobs/sweep/x/DataLoss02.java
new file mode 100755
index 0000000..966029b
--- /dev/null
+++ b/sim/gobs/src/gobs/sweep/x/DataLoss02.java
@@ -0,0 +1,194 @@
+
+package gobs.sweep.x;
+
+import java.math.BigInteger;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import gobs.sim.*;
+import gobs.sweep.*;
+import gobs.util.*;
+import gobs.plot.*;
+
+/**
+ More general range of cases of mean time to object loss test.
+*/
+
+public class DataLoss02
+{
+ static Properties properties;
+
+ static DecimalFormat df = new DecimalFormat("0.0");
+
+ public static void main(String[] args)
+ {
+ properties = Sweep.getopts(args);
+
+ AbstractSweep.seed(properties);
+
+ String output = Tools.string(properties, "output");
+
+ int minMTTF = Tools.integer(properties, "disk.mttf.min");
+ int maxMTTF = Tools.integer(properties, "disk.mttf.max");
+ String stepMTTF = Tools.string(properties, "disk.mttf.step");
+ List<String> valuesMTTF =
+ Sweep.values(stepMTTF, minMTTF, maxMTTF);
+
+ System.out.println("DataLoss02: mttf: " + valuesMTTF);
+
+ final XYSeriesCollection collection = new XYSeriesCollection();
+ XYSeries series;
+
+ List<XYSeries> allSeries = new ArrayList<XYSeries>();
+
+ double diskSpeed = Tools.decimal(properties, "disk.speed");
+ double diskSize = Tools.decimal(properties, "disk.size");
+
+ properties.setProperty("impl.placement", "Nearest");
+ List<String> systems = Tools.list(properties, "systems");
+ for (String system : systems)
+ {
+ int nodeDevices = Tools.integer(properties, system+".node.osds");
+ String spec = Tools.string(properties, system+".raid");
+ RAID raid = new RAID(spec, diskSize, diskSpeed);
+ int nodes = estimateNodes(properties, nodeDevices,
+ diskSize, raid);
+ properties.setProperty("node.count", ""+nodes);
+ properties.setProperty("node.osds", ""+nodeDevices);
+ properties.setProperty("rebuild.rate",
+ ""+(diskSpeed*raid.data()));
+ List<String> values = raidValues(raid, valuesMTTF);
+ Sweep pSweep = new Sweep(properties);
+ pSweep.repeats = Tools.integer(properties, "repeats");
+ series = pSweep.perform("Cluster", "mttf", values, "lost");
+ allSeries.add(series);
+ }
+
+ /*
+ properties.setProperty("impl.placement", "Kademlia");
+ ArraySweep kSweep = new ArraySweep(properties);
+ kSweep.repeats = Tools.integer(properties, "repeats");
+ kSweep.execute("Kademlia", "nodes", values, "distribution");
+ allSeries.addAll(kSweep.collection);
+
+ properties.setProperty("impl.placement", "VertexGroups");
+ ArraySweep vgSweep = new ArraySweep(properties);
+ vgSweep.repeats = Tools.integer(properties, "repeats");
+ vgSweep.execute("Vertex Groups", "nodes", values, "distribution");
+ allSeries.addAll(vgSweep.collection);
+ */
+
+ for (XYSeries s : allSeries)
+ collection.addSeries(s);
+
+ MultiplePlot.plot(collection, "",
+ "Mean Time to Disk Failure",
+ "Mean Time to Object Loss", output);
+
+ // AsciiPlot.plot(pSweep.series, "Maximum Rebuild Load",
+ // "nodes", "load", "tmp.txt");
+ }
+
+ static List<String> raidValues(RAID raid, List<String> input)
+ {
+ List<String> result = new ArrayList<String>(input.size());
+
+ for (String s : input)
+ {
+ double mttf = Double.parseDouble(s);
+ double raidMTTF = raid.computeMTTF(mttf);
+ result.add(df.format(raidMTTF));
+ }
+
+ return result;
+ }
+
+ static int estimateNodes(Properties properties, int nodeDevices,
+ double diskSize, RAID raid)
+ {
+ int nodes = -1;
+ int files = Tools.integer(properties, "files");
+ FileFactory factory = Simulator.setupFileFactory(properties);
+
+ BigInteger total = BigInteger.ZERO;
+ for (int i = 0; i < files; i++)
+ {
+ BigInteger size = factory.getSize();
+ total = total.add(size);
+ }
+ System.out.println("ESTIMATE_FS: " + File.toString(total));
+
+ int nodeDisks = nodeDevices * raid.data();
+ BigInteger nd = BigInteger.valueOf(nodeDisks);
+ BigInteger ds = BigInteger.valueOf((long) diskSize);
+ BigInteger nodeSpace = nd.multiply(ds);
+ nodes = total.divide(nodeSpace).add(BigInteger.ONE).intValue();
+
+ return nodes;
+ }
+
+ /**
+ Plot average number of lost objects for each MTTF.
+ @param label E.g., "PAST"
+ */
+ static List<XYSeries> plots(Sweep sweep, String label,
+ List<String> valuesNodes,
+ List<String> valuesMTTF)
+ {
+ List<XYSeries> results = new ArrayList<XYSeries>();
+
+ for (String nodes : valuesNodes)
+ {
+ XYSeries series = new XYSeries(label + " N=" + nodes);
+ for (String mttf : valuesMTTF)
+ {
+ double time = 0.0;
+ int lost = 0;
+ double total = 0.0;
+ for (Simulator simulator : sweep.sims.values())
+ if (simulator.string("nodes").equals(nodes) &&
+ simulator.string("mttf").equals(mttf))
+ {
+ System.out.println(simulator.string("tag"));
+ time += Tools.decimal(simulator.stats.results, "time");
+ lost += Tools.integer(simulator.stats.results, "lost");
+ total++;
+ }
+ if (lost > 0)
+ series.add(Integer.parseInt(mttf), time/lost);
+ }
+ results.add(series);
+ }
+ return results;
+ }
+
+ static void loadsToSeries(XYSeries series, List<Rebuild> rebuilds,
+ double interval)
+ {
+ double longest = longestRebuild(rebuilds);
+ double d = 0.0;
+ while (d <= longest)
+ {
+ double total = 0.0;
+ for (Rebuild rebuild : rebuilds)
+ total += rebuild.loadOffset(d);
+ double sample = total/rebuilds.size();
+ series.add(d, sample);
+ d += interval;
+ }
+ }
+
+ static double longestRebuild(List<Rebuild> rebuilds)
+ {
+ double max = 0.0;
+ for (Rebuild rebuild : rebuilds)
+ if (rebuild.length() > max)
+ max = rebuild.length();
+ return max;
+ }
+}
diff --git a/sim/gobs/src/gobs/sweep/x/RAID01.java b/sim/gobs/src/gobs/sweep/x/RAID01.java
new file mode 100755
index 0000000..08d48b1
--- /dev/null
+++ b/sim/gobs/src/gobs/sweep/x/RAID01.java
@@ -0,0 +1,58 @@
+
+package gobs.sweep.x;
+
+/**
+ * Plot RAID MTTF given a range of individual disk MTTFs.
+ */
+
+import java.util.List;
+import java.util.Properties;
+
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+
+import gobs.plot.MultiplePlot;
+import gobs.sim.RAID;
+import gobs.sweep.AbstractSweep;
+import gobs.sweep.Sweep;
+import gobs.util.Tools;
+
+public class RAID01
+{
+ static Properties properties;
+
+ public static void main(String[] args)
+ {
+ properties = Sweep.getopts(args);
+ String output = Tools.string(properties, "output");
+
+ int min = Tools.integer(properties, "mttf.min");
+ int max = Tools.integer(properties, "mttf.max");
+ String step = Tools.string(properties, "mttf.step");
+ List<String> values = AbstractSweep.values(step, min, max);
+
+ double diskSpeed = Tools.decimal(properties, "disk.speed");
+ double diskSize = Tools.decimal(properties, "disk.size");
+
+ String rs = Tools.string(properties, "raids");
+ List<String> raids = AbstractSweep.values(rs);
+
+ XYSeriesCollection collection = new XYSeriesCollection();
+ for (String r : raids)
+ {
+ RAID raid = new RAID(r);
+ XYSeries series = new XYSeries("RAID: " + raid);
+ for (String v : values)
+ {
+ double mttf = Double.parseDouble(v);
+ double result = raid.computeMTTF(diskSpeed, diskSize, mttf);
+ series.add(mttf, result);
+ }
+ collection.addSeries(series);
+ }
+
+ MultiplePlot.plot(collection, "",
+ "Mean Time to Disk Failure",
+ "Mean Time to RAID Failure", output);
+ }
+}
diff --git a/sim/gobs/src/gobs/test/TestFileFactory.java b/sim/gobs/src/gobs/test/TestFileFactory.java
index b184b4b..f88037c 100644
--- a/sim/gobs/src/gobs/test/TestFileFactory.java
+++ b/sim/gobs/src/gobs/test/TestFileFactory.java
@@ -45,7 +45,12 @@ class TestFileFactory
simulator.nodes = new ArrayList<Node>();
simulator.nodes.add(null);
- factory = new PDSIFiles(simulator, points);
+ Properties properties = new Properties();
+
+ properties.setProperty("node.count", "10");
+ properties.setProperty("node.osds", "1");
+
+ factory = new PDSIFiles(properties, points);
PriorityQueue<File> files =
new PriorityQueue<File>(n+1, new FileSizeComparator());
diff --git a/sim/gobs/src/gobs/util/Time.java b/sim/gobs/src/gobs/util/Time.java
index 849fb64..260ee02 100755
--- a/sim/gobs/src/gobs/util/Time.java
+++ b/sim/gobs/src/gobs/util/Time.java
@@ -1,52 +1,52 @@
-package gobs.util;
-
-import java.text.DecimalFormat;
-
-import static java.lang.Math.floor;
-
-public class Time
-{
- double value;
-
- public static final double minute = 60;
- public static final double hour = 60*minute;
- public static final double day = 24*hour;
-
- static DecimalFormat zz = new DecimalFormat("00");
-
- public String toString()
- {
- return toString(value);
- }
-
- public static String toString(double time)
- {
- StringBuilder sb = new StringBuilder(32);
- if (time > day)
- {
- sb.append(floor(time/day)).append(" ");
- time %= day;
- }
- if (time > hour || sb.length() > 0)
- {
- sb.append(zz.format(floor(time/hour))).append(":");
- time %= hour;
- }
- if (time > minute || sb.length() > 0)
- {
- sb.append(zz.format(floor(time/minute))).append(":");
- time %= minute;
- }
- sb.append(zz.format(time));
- return sb.toString();
- }
-
- /**
- Debugging only.
- */
- public static void main(String args[])
- {
- double d = Double.parseDouble(args[0]);
- System.out.println(toString(d));
- }
-}
+package gobs.util;
+
+import java.text.DecimalFormat;
+
+import static java.lang.Math.floor;
+
+public class Time
+{
+ double value;
+
+ public static final double minute = 60;
+ public static final double hour = 60*minute;
+ public static final double day = 24*hour;
+
+ static DecimalFormat zz = new DecimalFormat("00");
+
+ public String toString()
+ {
+ return toString(value);
+ }
+
+ public static String toString(double time)
+ {
+ StringBuilder sb = new StringBuilder(32);
+ if (time > day)
+ {
+ sb.append(floor(time/day)).append(" ");
+ time %= day;
+ }
+ if (time > hour || sb.length() > 0)
+ {
+ sb.append(zz.format(floor(time/hour))).append(":");
+ time %= hour;
+ }
+ if (time > minute || sb.length() > 0)
+ {
+ sb.append(zz.format(floor(time/minute))).append(":");
+ time %= minute;
+ }
+ sb.append(zz.format(time));
+ return sb.toString();
+ }
+
+ /**
+ Debugging only.
+ */
+ public static void main(String args[])
+ {
+ double d = Double.parseDouble(args[0]);
+ System.out.println(toString(d));
+ }
+}
diff --git a/sim/gobs/src/gobs/util/Tools.java b/sim/gobs/src/gobs/util/Tools.java
index 866f36d..cf1fdf5 100644
--- a/sim/gobs/src/gobs/util/Tools.java
+++ b/sim/gobs/src/gobs/util/Tools.java
@@ -3,7 +3,9 @@ package gobs.util;
import java.io.IOException;
import java.math.BigInteger;
+import java.util.Arrays;
import java.util.Date;
+import java.util.List;
import java.util.Properties;
/**
@@ -136,6 +138,19 @@ public class Tools
return false;
}
+ public static List<String> list(Properties properties, String string)
+ {
+ String text = string(properties, string);
+ return stringToList(text);
+ }
+
+ public static List<String> stringToList(String text)
+ {
+ String[] tokens = text.split(";");
+ List<String> result = Arrays.asList(tokens);
+ return result;
+ }
+
/**
Call bail(msg) if condition is false.
Like assert() but does not require -ea.
diff --git a/sim/gobs/sweeps/About.txt b/sim/gobs/sweeps/About.txt
new file mode 100644
index 0000000..a9512cf
--- /dev/null
+++ b/sim/gobs/sweeps/About.txt
@@ -0,0 +1,21 @@
+
+Standard for tests:
+
+A test has a NAME
+
+Run NAME.zsh
+
+Main argument is NAME.cfg which includes other cfg files
+
+Produces NAME.eps and NAME.out
+
+Sizes:
+
+mini: Easily debuggable, trivial
+
+small: Easily debuggable but produces interesting behavior
+
+medium: Uses real-world coefficients but coarse plots
+
+full: Real-world coefficients, production plots
+
diff --git a/sim/gobs/sweeps/classpath.zsh b/sim/gobs/sweeps/classpath.zsh
index d321219..312252c 100644
--- a/sim/gobs/sweeps/classpath.zsh
+++ b/sim/gobs/sweeps/classpath.zsh
@@ -6,8 +6,8 @@ if [[ $( uname ) == CYGWIN* ]]
then
typeset -T CP cp ";"
cp+=( ${classpath} )
- cp+=./src
+ cp+=${GOBS}/src
cp+=( prereqs/*.jar )
else
- CP=${CLASSPATH}:./src
+ CP=${CLASSPATH}:${GOBS}/src
fi
diff --git a/sim/gobs/sweeps/disks-small.cfg b/sim/gobs/sweeps/disks-small.cfg
new file mode 100644
index 0000000..8b2bd3f
--- /dev/null
+++ b/sim/gobs/sweeps/disks-small.cfg
@@ -0,0 +1,23 @@
+
+mttr = 50
+
+disk.size = 1000000
+disk.speed = 100
+
+disk.mttf.min = 1000
+disk.mttf.max = 2000
+disk.mttf.step = interval:500
+
+systems = san;target
+
+# RAID: None
+cluster.node.osds = 1
+cluster.raid = 1+0
+
+# RAID: 4 @ 4+2
+san.node.osds = 4
+san.raid = 4+2
+
+# RAID: 2 @ 3+1
+target.node.osds = 2
+target.raid = 3+1
diff --git a/sim/gobs/sweeps/dl01-medium.cfg b/sim/gobs/sweeps/dl01-medium.cfg
new file mode 100644
index 0000000..820d382
--- /dev/null
+++ b/sim/gobs/sweeps/dl01-medium.cfg
@@ -0,0 +1,39 @@
+
+# Simulator configuration
+
+# Basics:
+
+include = system_30-100.cfg faults-range02.cfg user00.cfg \
+ fs_pdsi_medium.cfg dl_output.cfg
+
+# Bit-length of addresses:
+B = 32
+
+fault.count = 30
+fault.dataloss = 0.5
+
+node.diskspernode = 1
+
+# Clear some memory after each simulator run
+sweep.free = true
+
+# Do a fsck
+fsck = true
+# Check for stray objects
+strays = true
+
+### Choose a PlacementScheme implementation:
+
+#impl.placement = Kademlia
+impl.placement = Nearest
+#impl.placement = VertexGroups
+
+vertexgroups.prefix = 6
+# Replica selection: See Replicated.locateSource()
+replica.source = primary
+
+### Choose a NodeScheme implementation:
+
+# impl.nodefactory = RandomNodes
+impl.nodefactory = SimpleNodes
+
diff --git a/sim/gobs/sweeps/dl01-medium.zsh b/sim/gobs/sweeps/dl01-medium.zsh
new file mode 100755
index 0000000..7733b26
--- /dev/null
+++ b/sim/gobs/sweeps/dl01-medium.zsh
@@ -0,0 +1,9 @@
+#!/bin/zsh
+
+NAME="dl01-medium"
+SEED="seed=821"
+CLASS=gobs.sweep.x.DataLoss01
+
+SWEEPDIR=$( dirname $0 )
+
+source ${SWEEPDIR}/sweep.zsh
diff --git a/sim/gobs/sweeps/dl01-small.zsh b/sim/gobs/sweeps/dl01-small.zsh
index 6290c9b..32a98c7 100755
--- a/sim/gobs/sweeps/dl01-small.zsh
+++ b/sim/gobs/sweeps/dl01-small.zsh
@@ -1,24 +1,9 @@
#!/bin/zsh
-CP=${CLASSPATH}:./src
-
-SWEEPDIR=$( dirname $0 )
-source ${SWEEPDIR}/classpath.zsh
-source ${SWEEPDIR}/build.zsh
-
NAME="dl01-small"
-[[ ${N} == "" ]] && N=2
-
SEED="seed=821"
-{
- java -ea -Xmx1000M -cp ${CP} gobs.sweep.x.DataLoss01 \
- -n ${N} -p sweeps ${NAME}.cfg ${SEED} -o ${NAME}.eps
- CODE=$?
-} >& ${NAME}.out
+CLASS=gobs.sweep.x.DataLoss01
+
+SWEEPDIR=$( dirname $0 )
-if (( CODE ))
-then
- less ${NAME}.out
-else
- print "wrote: ${NAME}.out"
-fi
+source ${SWEEPDIR}/sweep.zsh
diff --git a/sim/gobs/sweeps/dl02-small.cfg b/sim/gobs/sweeps/dl02-small.cfg
new file mode 100644
index 0000000..f98fb5d
--- /dev/null
+++ b/sim/gobs/sweeps/dl02-small.cfg
@@ -0,0 +1,38 @@
+
+# Simulator configuration
+
+# Basics:
+
+include = disks-small.cfg user00.cfg \
+ fs_pdsi_small.cfg dl_output.cfg
+
+# Bit-length of addresses:
+B = 16
+
+fault.count = 10
+fault.dataloss = 0.5
+
+node.diskspernode = 1
+
+# Clear some memory after each simulator run
+sweep.free = true
+
+# Do a fsck
+fsck = true
+# Check for stray objects
+strays = true
+
+### Choose a PlacementScheme implementation:
+
+#impl.placement = Kademlia
+impl.placement = Nearest
+#impl.placement = VertexGroups
+
+vertexgroups.prefix = 6
+# Replica selection: See Replicated.locateSource()
+replica.source = primary
+
+### Choose a NodeScheme implementation:
+
+# impl.nodefactory = RandomNodes
+impl.nodefactory = SimpleNodes
diff --git a/sim/gobs/sweeps/dl02-small.zsh b/sim/gobs/sweeps/dl02-small.zsh
new file mode 100755
index 0000000..63fdb4c
--- /dev/null
+++ b/sim/gobs/sweeps/dl02-small.zsh
@@ -0,0 +1,9 @@
+#!/bin/zsh
+
+NAME="dl02-small"
+SEED="seed=821"
+CLASS=gobs.sweep.x.DataLoss02
+
+SWEEPDIR=$( dirname $0 )
+
+source ${SWEEPDIR}/sweep.zsh
diff --git a/sim/gobs/sweeps/faults-range01.cfg b/sim/gobs/sweeps/faults-range01.cfg
index 1f6e169..3662dcf 100644
--- a/sim/gobs/sweeps/faults-range01.cfg
+++ b/sim/gobs/sweeps/faults-range01.cfg
@@ -1,7 +1,8 @@
-mttf.min = 1500
-mttf.max = 2000
-mttf.step = literal_1500,1700,2000
+mttf.min = 700
+mttf.max = 1400
+mttf.step = interval:100
+# literal_1500,1700,2000
#interval_2000
-mttr = 200
+mttr = 500
diff --git a/sim/gobs/sweeps/faults-range02.cfg b/sim/gobs/sweeps/faults-range02.cfg
new file mode 100644
index 0000000..04ef38d
--- /dev/null
+++ b/sim/gobs/sweeps/faults-range02.cfg
@@ -0,0 +1,11 @@
+
+# One fault per day to one fault per week
+
+# Used for medium tests
+
+mttf.min = 86400
+mttf.max = 604800
+mttf.step = interval:86400
+
+# 1/2 day
+mttr = 43200
diff --git a/sim/gobs/sweeps/fs_pdsi_medium.cfg b/sim/gobs/sweeps/fs_pdsi_medium.cfg
index 171779b..7170674 100644
--- a/sim/gobs/sweeps/fs_pdsi_medium.cfg
+++ b/sim/gobs/sweeps/fs_pdsi_medium.cfg
@@ -1,11 +1,8 @@
-# FS PDSI SMALL
+# FS PDSI MEDIUM
-B = 32
-
-# Number of files:
-files = 10
-# FileFactory implementation PlainFiles
impl.filefactory = PDSIFiles
-# 20% size 0, 60% size 1K-100K, 20% size 100K-10M
+# Number of files:
+files = 30
+# 10% size 0, 90% size 4TB-1PB
file.pdsi.points = 0.1,1K;0.1,4T;1.0,1P
diff --git a/sim/gobs/sweeps/fs_pdsi_mini.cfg b/sim/gobs/sweeps/fs_pdsi_mini.cfg
index 150d3ce..7049e60 100644
--- a/sim/gobs/sweeps/fs_pdsi_mini.cfg
+++ b/sim/gobs/sweeps/fs_pdsi_mini.cfg
@@ -1,6 +1,8 @@
# FS PDSI MINI
+# 97 MB
+
B = 16
files = 20
diff --git a/sim/gobs/sweeps/fs_pdsi_small.cfg b/sim/gobs/sweeps/fs_pdsi_small.cfg
index ef2dd25..6f81ea5 100644
--- a/sim/gobs/sweeps/fs_pdsi_small.cfg
+++ b/sim/gobs/sweeps/fs_pdsi_small.cfg
@@ -1,11 +1,9 @@
# FS PDSI SMALL
-B = 32
-
# Number of files:
-files = 10
+files = 20
# FileFactory implementation PlainFiles
impl.filefactory = PDSIFiles
-# 20% size 0, 60% size 1K-100K, 20% size 100K-10M
-file.pdsi.points = 0.2,1K;0.8,100K;1.0,10M
+# 20% size 0, 40% size 1K-1M, 40% size 1M-20M
+file.pdsi.points = 0.2,1K;0.6,1M;1.0,20M
diff --git a/sim/gobs/sweeps/raid01.cfg b/sim/gobs/sweeps/raid01.cfg
new file mode 100644
index 0000000..81d99b4
--- /dev/null
+++ b/sim/gobs/sweeps/raid01.cfg
@@ -0,0 +1,10 @@
+
+mttf.min = 1000
+mttf.max = 2000
+mttf.step = interval:100
+
+disk.speed = 1000
+disk.size = 10000
+
+# raids = 8+2;4+1
+raids = 4+1
diff --git a/sim/gobs/sweeps/raid01.zsh b/sim/gobs/sweeps/raid01.zsh
new file mode 100755
index 0000000..cc89281
--- /dev/null
+++ b/sim/gobs/sweeps/raid01.zsh
@@ -0,0 +1,8 @@
+#!/bin/zsh
+
+NAME="raid01"
+CLASS="gobs.sweep.x.RAID01"
+
+SWEEPDIR=$( dirname $0 )
+
+source ${SWEEPDIR}/sweep.zsh
diff --git a/sim/gobs/sweeps/sweep.zsh b/sim/gobs/sweeps/sweep.zsh
new file mode 100644
index 0000000..956491a
--- /dev/null
+++ b/sim/gobs/sweeps/sweep.zsh
@@ -0,0 +1,27 @@
+
+# Source this for sweep setup
+
+GOBS=${SWEEPDIR}/..
+
+source ${SWEEPDIR}/classpath.zsh
+source ${SWEEPDIR}/build.zsh
+
+[[ ${N} == "" ]] && N=2
+
+start=$( date +%s )
+
+{
+ java -ea -Xmx1000M -cp ${CP} ${CLASS} \
+ -n ${N} -p sweeps ${NAME}.cfg ${SEED} -o ${NAME}.eps
+ CODE=$?
+} >& ${NAME}.out
+
+if (( CODE ))
+then
+ less ${NAME}.out
+else
+ print "wrote: ${NAME}.out"
+fi
+
+stop=$( date +%s )
+print "took: $(( stop - start ))"
diff --git a/sim/gobs/sweeps/system_10-20.cfg b/sim/gobs/sweeps/system_10-20.cfg
index 048e462..8d40a27 100644
--- a/sim/gobs/sweeps/system_10-20.cfg
+++ b/sim/gobs/sweeps/system_10-20.cfg
@@ -7,5 +7,4 @@ rebuild.rate = 100000
# Number of servers:
nodes.min = 10
nodes.max = 20
-nodes.step = literal_10,15,20
-
+nodes.step = literal:10,15,20
diff --git a/sim/gobs/sweeps/system_30-100.cfg b/sim/gobs/sweeps/system_30-100.cfg
new file mode 100644
index 0000000..3428ba1
--- /dev/null
+++ b/sim/gobs/sweeps/system_30-100.cfg
@@ -0,0 +1,12 @@
+
+### System size: 30-100 servers
+
+# Number of servers:
+nodes.min = 30
+nodes.max = 100
+nodes.step = literal:30,50,75,100
+
+### General parameters:
+
+# 16 GB/s
+rebuild.rate = 16000000000
hooks/post-receive
--
Grayskull Repository
1
0
Grayskull Repository branch, master, updated. git-migration-395-g95e3d46
by noreply@mcs.anl.gov 16 Feb '10
by noreply@mcs.anl.gov 16 Feb '10
16 Feb '10
A ref change was pushed to the repository containing
the project "Grayskull Repository".
The branch, master has been updated
via 95e3d4663534a68b1b04cbbd3df9011a4a70dee9 (commit)
via 08c14e7b05e193676899b0a03d2f2f22d2b801dc (commit)
via b6c5f9384de6073dc388d2203735c3b82a2fa8c8 (commit)
via 0cb2e255b638061e8f0fa459d0c725e74c9f8f2b (commit)
via 45ea2ca80ae9f72e58739b7ef96e2c6beb1e4b04 (commit)
via e4b3d21070682f63d032c6181d6dcc62bc187442 (commit)
via d919960126d5bd6af46692edb1d91d648362fa3b (commit)
via b4041c2a4f984fac73c518ba90e626126bcb96ce (commit)
via c3a791fa1c77b7bec32d11e39b01d178e0c1f451 (commit)
via ae35267d0744a873b18a971760fe273291f38bbf (commit)
via ac7f387e865a0b102acc2c608cc816174f388d6c (commit)
via 29999ea9d95e40061cb04d4e817273ea01cc0b67 (commit)
via 6237479a74917f79bd6d833e01a4f065b89edd0f (commit)
via f8fe3debc783bb10390eca27da093c0b3db15bb8 (commit)
via 5645a930990d36af93020d0fbd55438165fe8ee8 (commit)
from 39c6d116f4d6740f6cd3a96bf168fb751c62f0a2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 95e3d4663534a68b1b04cbbd3df9011a4a70dee9
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 17:10:12 2010 -0600
EOL fixes.
commit 08c14e7b05e193676899b0a03d2f2f22d2b801dc
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 17:09:05 2010 -0600
New and modified cfgs.
commit b6c5f9384de6073dc388d2203735c3b82a2fa8c8
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 17:06:50 2010 -0600
Quick fixes to get dl01-small going.
commit 0cb2e255b638061e8f0fa459d0c725e74c9f8f2b
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 14:07:57 2010 -0600
Move system_size*.cfg to system_*.cfg.
Migrating all tests to include systems from system_*.cfg to standardize
testing.
commit 45ea2ca80ae9f72e58739b7ef96e2c6beb1e4b04
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 14:07:36 2010 -0600
Minors.
commit e4b3d21070682f63d032c6181d6dcc62bc187442
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 11:38:41 2010 -0600
Simulator now induces non-data-loss Faults.
commit d919960126d5bd6af46692edb1d91d648362fa3b
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 11:20:36 2010 -0600
Support for "unavailability".
Node outage no longer implies data loss.
commit b4041c2a4f984fac73c518ba90e626126bcb96ce
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 11:15:39 2010 -0600
Add support for disks/node and fractional data loss.
commit c3a791fa1c77b7bec32d11e39b01d178e0c1f451
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Tue Feb 16 11:01:43 2010 -0600
Comments.
commit ae35267d0744a873b18a971760fe273291f38bbf
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 14:24:28 2010 -0600
New script to simplify sweep runs.
commit ac7f387e865a0b102acc2c608cc816174f388d6c
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 14:20:00 2010 -0600
More obvious error message.
commit 29999ea9d95e40061cb04d4e817273ea01cc0b67
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 14:19:44 2010 -0600
Correction to build.xml .
commit 6237479a74917f79bd6d833e01a4f065b89edd0f
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 14:06:42 2010 -0600
Cause class notes the cause of an object Copy.
commit f8fe3debc783bb10390eca27da093c0b3db15bb8
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 14:06:23 2010 -0600
Fix description.
commit 5645a930990d36af93020d0fbd55438165fe8ee8
Author: Justin Wozniak <wozniak(a)mcs.anl.gov>
Date: Mon Feb 15 11:16:21 2010 -0600
Corrected description.
-----------------------------------------------------------------------
Summary of changes:
sim/gobs/.settings/org.eclipse.jdt.core.prefs | 562 ++++++++++----------
sim/gobs/build.xml | 2 +-
sim/gobs/scripts/{sim.zsh => sweep.zsh} | 6 +-
sim/gobs/src/gobs/sim/Cause.java | 2 +-
sim/gobs/src/gobs/sim/Fault.java | 12 +-
sim/gobs/src/gobs/sim/Node.java | 24 +-
sim/gobs/src/gobs/sim/Simulator.java | 60 ++-
sim/gobs/src/gobs/sim/Status.java | 16 +-
sim/gobs/src/gobs/sweep/x/DataLoss01.java | 2 +-
sim/gobs/src/gobs/util/Tools.java | 2 +-
sim/gobs/sweeps/dl01-small.cfg | 73 +---
sim/gobs/sweeps/dl01-small.zsh | 12 +-
sim/gobs/sweeps/faults-range01.cfg | 7 +
sim/gobs/sweeps/faults01.cfg | 3 +
sim/gobs/sweeps/rb02.cfg | 4 +-
sim/gobs/sweeps/rb_output.cfg | 6 +-
sim/gobs/sweeps/system_10-20.cfg | 11 +
.../sweeps/{system_size_10.cfg => system_10.cfg} | 0
...ystem_size_100-1000.cfg => system_100-1000.cfg} | 0
.../{system_size_1000.cfg => system_1000.cfg} | 0
...ystem_size_100_1000.cfg => system_100_1000.cfg} | 0
...{system_size_120_640.cfg => system_120_640.cfg} | 0
...{system_size_20-1000.cfg => system_20-1000.cfg} | 0
.../{system_size_20-40.cfg => system_20-40.cfg} | 0
...{system_size_240-640.cfg => system_240-640.cfg} | 0
..._pdsi_100-1000.cfg => system_pdsi_100-1000.cfg} | 0
...m_size_pdsi_20-40.cfg => system_pdsi_20-40.cfg} | 1 -
sim/gobs/sweeps/{user01.cfg => user00.cfg} | 6 +-
28 files changed, 422 insertions(+), 389 deletions(-)
copy sim/gobs/scripts/{sim.zsh => sweep.zsh} (83%)
create mode 100644 sim/gobs/sweeps/faults-range01.cfg
create mode 100644 sim/gobs/sweeps/faults01.cfg
create mode 100644 sim/gobs/sweeps/system_10-20.cfg
rename sim/gobs/sweeps/{system_size_10.cfg => system_10.cfg} (100%)
rename sim/gobs/sweeps/{system_size_100-1000.cfg => system_100-1000.cfg} (100%)
rename sim/gobs/sweeps/{system_size_1000.cfg => system_1000.cfg} (100%)
rename sim/gobs/sweeps/{system_size_100_1000.cfg => system_100_1000.cfg} (100%)
rename sim/gobs/sweeps/{system_size_120_640.cfg => system_120_640.cfg} (100%)
rename sim/gobs/sweeps/{system_size_20-1000.cfg => system_20-1000.cfg} (100%)
rename sim/gobs/sweeps/{system_size_20-40.cfg => system_20-40.cfg} (100%)
rename sim/gobs/sweeps/{system_size_240-640.cfg => system_240-640.cfg} (100%)
rename sim/gobs/sweeps/{system_size_pdsi_100-1000.cfg => system_pdsi_100-1000.cfg} (100%)
rename sim/gobs/sweeps/{system_size_pdsi_20-40.cfg => system_pdsi_20-40.cfg} (87%)
copy sim/gobs/sweeps/{user01.cfg => user00.cfg} (52%)
Diff of changes:
diff --git a/sim/gobs/.settings/org.eclipse.jdt.core.prefs b/sim/gobs/.settings/org.eclipse.jdt.core.prefs
index 5c5b808..ae04ef0 100644
--- a/sim/gobs/.settings/org.eclipse.jdt.core.prefs
+++ b/sim/gobs/.settings/org.eclipse.jdt.core.prefs
@@ -1,281 +1,281 @@
-#Thu Jan 28 14:16:33 CST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=1
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=70
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=2
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=70
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=2
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Tue Feb 16 10:58:40 CST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=70
+org.eclipse.jdt.core.formatter.compact_else_if=false
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=70
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/sim/gobs/build.xml b/sim/gobs/build.xml
index 90156bc..3e74705 100644
--- a/sim/gobs/build.xml
+++ b/sim/gobs/build.xml
@@ -27,7 +27,7 @@
<jar destfile="GOBS.jar"
manifest="manifest.mf">
<zipfileset dir="src"
- includes="gobs/*/*.class" />
+ includes="gobs/**/*.class" />
</jar>
</target>
diff --git a/sim/gobs/scripts/sim.zsh b/sim/gobs/scripts/sweep.zsh
similarity index 83%
copy from sim/gobs/scripts/sim.zsh
copy to sim/gobs/scripts/sweep.zsh
index ceb9648..7689663 100755
--- a/sim/gobs/scripts/sim.zsh
+++ b/sim/gobs/scripts/sweep.zsh
@@ -1,6 +1,5 @@
#!/bin/zsh
-# Run the GOBS Simulator class.
# User must have run ant jar to get the GOBS.jar
# User may set ${GOBS_LOCATION} to set the GOBS location,
# the default is ${PWD}
@@ -9,6 +8,9 @@
typeset -T CP cp
+SWEEP=$1
+shift
+
cp=()
cp+=${GOBS_LOCATION}/GOBS.jar
@@ -18,4 +20,4 @@ do
cp+=${f}
done
-java -cp ${CP} gobs.sim.Simulator ${*}
+java -cp ${CP} gobs.sweep.x.${SWEEP} ${*}
diff --git a/sim/gobs/src/gobs/sim/Cause.java b/sim/gobs/src/gobs/sim/Cause.java
index 7a07d5b..4b8c62a 100644
--- a/sim/gobs/src/gobs/sim/Cause.java
+++ b/sim/gobs/src/gobs/sim/Cause.java
@@ -2,7 +2,7 @@
package gobs.sim;
/**
- The direct cause for a Copy.
+ The efficient cause for a Copy.
*/
public enum Cause
{
diff --git a/sim/gobs/src/gobs/sim/Fault.java b/sim/gobs/src/gobs/sim/Fault.java
index fbe14c3..dd4440d 100644
--- a/sim/gobs/src/gobs/sim/Fault.java
+++ b/sim/gobs/src/gobs/sim/Fault.java
@@ -1,16 +1,24 @@
package gobs.sim;
+import gobs.util.Bits;
import gobs.util.Time;
class Fault
extends Event
{
+ /**
+ If set, data was lost as a result of this Fault.
+ */
+ static boolean dataLost = false;
+
Fault(Simulator simulator)
{
super(simulator);
- this.finish = simulator.time() +
- simulator.pullFault();
+ finish = simulator.time() +
+ simulator.pullFault();
+ if (Bits.nextDouble() < Simulator.dataLossFraction)
+ dataLost = true;
}
String log()
diff --git a/sim/gobs/src/gobs/sim/Node.java b/sim/gobs/src/gobs/sim/Node.java
index a477b6d..3f85591 100644
--- a/sim/gobs/src/gobs/sim/Node.java
+++ b/sim/gobs/src/gobs/sim/Node.java
@@ -4,6 +4,7 @@ package gobs.sim;
import java.math.BigInteger;
import java.util.*;
+import gobs.util.Bits;
import gobs.util.Tools;
/**
@@ -43,7 +44,7 @@ public class Node
{
super(id);
this.simulator = simulator;
- objects = new HashMap<BigInteger,Gob>();
+ objects = new LinkedHashMap<BigInteger,Gob>();
}
void add(Gob object)
@@ -101,7 +102,8 @@ public class Node
simulator.print("rebuilds", "reboot: " + this);
simulator.nodes.add(this);
simulator.placer.register(this);
- replaceDisk();
+ if (status == Status.ZAPPED)
+ damage();
status = Status.UP;
Set<Copy> copies = rejoin(repair);
return copies;
@@ -147,12 +149,22 @@ public class Node
}
/**
- Act as though this Node's disk failed and was replaced.
- Essentially just empties {@link #objects}.
+ Simulate a disk failure.
+ Remove data from disks in accordance with Simulator.disksPerNode.
*/
- void replaceDisk()
+ void damage()
{
- objects.clear();
+ if (Simulator.disksPerNode == 1)
+ {
+ objects.clear();
+ return;
+ }
+
+ double r = 1 / Simulator.disksPerNode;
+ for (Iterator<Gob> it = objects.values().iterator();
+ it.hasNext(); )
+ if (Bits.nextDouble() < r)
+ it.remove();
}
/**
diff --git a/sim/gobs/src/gobs/sim/Simulator.java b/sim/gobs/src/gobs/sim/Simulator.java
index 1370261..7313da6 100644
--- a/sim/gobs/src/gobs/sim/Simulator.java
+++ b/sim/gobs/src/gobs/sim/Simulator.java
@@ -133,6 +133,16 @@ public class Simulator
*/
Rebuild currentRebuild = null;
+ /**
+ Disks per node.
+ */
+ static int disksPerNode = 1;
+
+ /**
+ Fraction of Faults that cause data loss.
+ */
+ static double dataLossFraction = 1;
+
static Simulator current;
static final int maxTries = 10;
@@ -285,15 +295,15 @@ public class Simulator
void setupTermination()
{
- if (has("faults"))
+ if (has("fault.count"))
{
mode = Termination.FAULTS;
- totalFaults = integer("faults");
+ totalFaults = integer("fault.count");
}
- else if (has("time"))
+ else if (has("simulator.duration"))
{
mode = Termination.TIME;
- totalTime = decimal("time");
+ totalTime = decimal("simulator.duration");
}
else
{
@@ -397,6 +407,9 @@ public class Simulator
System.out.println("NODES: " + N);
if (bool("print.initialnodes"))
printNodes(nodes);
+
+ disksPerNode = integer("node.diskspernode");
+ dataLossFraction = decimal("fault.dataloss");
}
void allocateFiles()
@@ -625,13 +638,14 @@ public class Simulator
{
System.out.println("faults: " + totalFaults);
// Advance to first fault:
- advanceTo(pullFault());
+ Fault fault = new Fault(this);
+ advanceTo(fault.finish);
while (! complete())
{
- Node failed = induceFault();
+ Node failed = induceFault(fault);
Collection<Gob> damaged = failed.collection();
placer.drop(failed);
- rebuild(failed, damaged);
+ fault = rebuild(failed, damaged);
}
System.out.println("END: " + Time.toString(time));
if (bool("print.rebuilds"))
@@ -647,18 +661,24 @@ public class Simulator
return mttfExponential.nextDouble()/nodes.size();
}
- void rebuild(Node failed, Collection<Gob> damaged)
+ /**
+ Perform a Rebuild.
+ @return The next Fault to occur.
+ */
+ Fault rebuild(Node failed, Collection<Gob> damaged)
{
- startRebuild(failed);
+ Fault fault = startRebuild(failed);
List<Copy> work = planCopies(damaged);
currentRebuild.rebuild(work);
completeRebuild();
+ return fault;
}
/**
Setup a Rebuild.
+ @return The next Fault to occur.
*/
- Rebuild startRebuild(Node failed)
+ Fault startRebuild(Node failed)
{
System.out.println("fault: " + faultCount);
// Schedule the next fault:
@@ -667,19 +687,22 @@ public class Simulator
Rebuild rebuild = new Rebuild(this, fault, repair);
repair.setRebuild(rebuild);
currentRebuild = rebuild;
- return rebuild;
+ return fault;
}
/**
Cause a fault.
@return The Node that was lost
*/
- Node induceFault()
+ Node induceFault(Fault fault)
{
+ faultCount++;
int index = Bits.nextInt(nodes.size());
Node failed = nodes.remove(index);
- failed.status = Status.DOWN;
- faultCount++;
+ if (fault.dataLost)
+ failed.status = Status.ZAPPED;
+ else
+ failed.status = Status.DOWN;
System.out.println("\nfailed: " + failed.name(this) +
" (" + failed.objects.size() + ")" +
" at: " + Time.toString(time));
@@ -763,7 +786,11 @@ public class Simulator
Event event = it.next();
if (event instanceof Copy)
{
- placer.copy((Copy) event);
+ Copy copy = (Copy) event;
+ if (! copy.destination.contains(copy.object.id))
+ placer.copy((Copy) event);
+ else
+ System.out.println("copy unnecessary: " + copy);
it.remove();
}
}
@@ -1138,7 +1165,8 @@ public class Simulator
for (Gob object : objects)
{
Integer C = count.get(object.id);
- if (object.replicas != C.intValue())
+ int c = (C != null) ? C.intValue() : 0;
+ if (object.replicas != c)
{
print("STRAY_ERROR: " + object.id +
" replicas: " + object.replicas + " counted: " + C);
diff --git a/sim/gobs/src/gobs/sim/Status.java b/sim/gobs/src/gobs/sim/Status.java
index 5ab87b0..9ffc2a8 100644
--- a/sim/gobs/src/gobs/sim/Status.java
+++ b/sim/gobs/src/gobs/sim/Status.java
@@ -7,6 +7,18 @@ package gobs.sim;
enum Status
{
- UP, DOWN
-}
+ /**
+ Normal operation
+ */
+ UP,
+
+ /**
+ Node is not available
+ */
+ DOWN,
+ /**
+ Node is down and will come back with missing data
+ */
+ ZAPPED
+}
diff --git a/sim/gobs/src/gobs/sweep/x/DataLoss01.java b/sim/gobs/src/gobs/sweep/x/DataLoss01.java
index 6f5a66c..533ff5d 100644
--- a/sim/gobs/src/gobs/sweep/x/DataLoss01.java
+++ b/sim/gobs/src/gobs/sweep/x/DataLoss01.java
@@ -75,7 +75,7 @@ class DataLoss01
for (XYSeries series : allSeries)
collection.addSeries(series);
- MultiplePlot.plot(collection, "Objects Lost",
+ MultiplePlot.plot(collection, "",
"MTTF", "objects", output);
// AsciiPlot.plot(pSweep.series, "Maximum Rebuild Load",
diff --git a/sim/gobs/src/gobs/util/Tools.java b/sim/gobs/src/gobs/util/Tools.java
index 06051d8..866f36d 100644
--- a/sim/gobs/src/gobs/util/Tools.java
+++ b/sim/gobs/src/gobs/util/Tools.java
@@ -191,7 +191,7 @@ public class Tools
{
try
{
- System.out.println("CWD: " +
+ System.out.println("PWD: " +
new java.io.File(".").getCanonicalFile());
}
catch (IOException f)
diff --git a/sim/gobs/sweeps/dl01-small.cfg b/sim/gobs/sweeps/dl01-small.cfg
index c14c396..0afc246 100644
--- a/sim/gobs/sweeps/dl01-small.cfg
+++ b/sim/gobs/sweeps/dl01-small.cfg
@@ -3,50 +3,25 @@
# Basics:
-include = dl_output.cfg
+include = system_10-20.cfg faults-range01.cfg user00.cfg \
+ fs_pdsi_mini.cfg dl_output.cfg
-# Statistics:
+# Bit-length of addresses:
+B = 16
+
+fault.count = 10
+fault.dataloss = 0.5
+
+node.diskspernode = 1
# Clear some memory after each simulator run
sweep.free = true
-# Rebuild traffic over time analysis:
-plot.traffic.interval = 10
-
# Do a fsck
fsck = true
+# Check for stray objects
strays = true
-### Parameters for GOBS Simulator run
-
-### General parameters:
-
-# Bit-length of addresses:
-B = 16
-# Number of servers:
-nodes.min = 12
-nodes.max = 12
-# Step through nodes: See AbstractSweep.values()
-nodes.step = literal_12
-# 14,16,18
-# Number of files:
-files = 10
-# Number of faults:
-faults = 30
-# Number of accesses:
-read.count = 0
-read.mode = random
-write.count = 0
-
-rebuild.rate = 10
-
-# Step through MTTF values: See AbstractSweep.values()
-mttf.min = 1500
-mttf.max = 1500
-mttf.step = interval_2000
-
-mttr = 200
-
### Choose a PlacementScheme implementation:
#impl.placement = Kademlia
@@ -62,31 +37,3 @@ replica.source = primary
# impl.nodefactory = RandomNodes
impl.nodefactory = SimpleNodes
-### Choose one of the following FileFactory sections:
-
-# FileFactory implementation PlainFiles
-impl.filefactory = PlainFiles
-# File size:
-file.size = 140
-# Strip size:
-file.strip = 4
-# File/object replicas:
-file.replicas = 3
-# Number of objects per file:
-file.width = 3
-
-# FileFactory implementation TraceFiles
-#impl.filefactory = TraceFiles
-# Trace filename:
-#filetrace = traces/test01.trace
-
-# FileFactory implementation RandomFiles
-#impl.filefactory = RandomFiles
-# Max size of big files:
-#filebigmax = 100
-# Min size of big files:
-#filebigmin = 50
-# Max size of small files:
-#filesmallmax = 20
-# Min size of small files:
-#filesmallmin = 0
diff --git a/sim/gobs/sweeps/dl01-small.zsh b/sim/gobs/sweeps/dl01-small.zsh
index 05f844c..6290c9b 100755
--- a/sim/gobs/sweeps/dl01-small.zsh
+++ b/sim/gobs/sweeps/dl01-small.zsh
@@ -7,14 +7,18 @@ source ${SWEEPDIR}/classpath.zsh
source ${SWEEPDIR}/build.zsh
NAME="dl01-small"
+[[ ${N} == "" ]] && N=2
SEED="seed=821"
{
java -ea -Xmx1000M -cp ${CP} gobs.sweep.x.DataLoss01 \
- -n 1 -p sweeps ${NAME}.cfg ${SEED} -o ${NAME}.eps
+ -n ${N} -p sweeps ${NAME}.cfg ${SEED} -o ${NAME}.eps
CODE=$?
} >& ${NAME}.out
-print "wrote: ${NAME}.out"
-
-(( CODE )) && less ${NAME}.out
+if (( CODE ))
+then
+ less ${NAME}.out
+else
+ print "wrote: ${NAME}.out"
+fi
diff --git a/sim/gobs/sweeps/faults-range01.cfg b/sim/gobs/sweeps/faults-range01.cfg
new file mode 100644
index 0000000..1f6e169
--- /dev/null
+++ b/sim/gobs/sweeps/faults-range01.cfg
@@ -0,0 +1,7 @@
+
+mttf.min = 1500
+mttf.max = 2000
+mttf.step = literal_1500,1700,2000
+#interval_2000
+
+mttr = 200
diff --git a/sim/gobs/sweeps/faults01.cfg b/sim/gobs/sweeps/faults01.cfg
new file mode 100644
index 0000000..e39ba44
--- /dev/null
+++ b/sim/gobs/sweeps/faults01.cfg
@@ -0,0 +1,3 @@
+
+mttf = 10
+mttr = 10
diff --git a/sim/gobs/sweeps/rb02.cfg b/sim/gobs/sweeps/rb02.cfg
index 0c9f308..6032884 100644
--- a/sim/gobs/sweeps/rb02.cfg
+++ b/sim/gobs/sweeps/rb02.cfg
@@ -28,8 +28,8 @@ files = 20
# Number of faults:
faults = 10
# Number of accesses:
-reads = 0
-writes = 0
+read.count = 0
+write.count = 0
# Rebuild transfer rate:
rebuild.rate = 16000000000
diff --git a/sim/gobs/sweeps/rb_output.cfg b/sim/gobs/sweeps/rb_output.cfg
index c14edb7..a997cd0 100644
--- a/sim/gobs/sweeps/rb_output.cfg
+++ b/sim/gobs/sweeps/rb_output.cfg
@@ -6,13 +6,13 @@ print.properties = true
# Print nodes and objects at startup (true/false)
print.initialnodes = true
# Print nodes and objects after each rebuild (true/false)
-print.nodes = false
+print.nodes = true
# Print object tranfers during rebuilds (true/false)
-print.rebuilds = false
+print.rebuilds = true
# Print file information (true/false)
print.files = false
+print.filesobjects = false
# Print load change statistics (true/false)
print.loaddiffs = true
# Print user accesses
print.accesses = false
-
diff --git a/sim/gobs/sweeps/system_10-20.cfg b/sim/gobs/sweeps/system_10-20.cfg
new file mode 100644
index 0000000..048e462
--- /dev/null
+++ b/sim/gobs/sweeps/system_10-20.cfg
@@ -0,0 +1,11 @@
+
+### System size: servers and characteristics.
+
+# 100 KB/s
+rebuild.rate = 100000
+
+# Number of servers:
+nodes.min = 10
+nodes.max = 20
+nodes.step = literal_10,15,20
+
diff --git a/sim/gobs/sweeps/system_size_10.cfg b/sim/gobs/sweeps/system_10.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_10.cfg
rename to sim/gobs/sweeps/system_10.cfg
diff --git a/sim/gobs/sweeps/system_size_100-1000.cfg b/sim/gobs/sweeps/system_100-1000.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_100-1000.cfg
rename to sim/gobs/sweeps/system_100-1000.cfg
diff --git a/sim/gobs/sweeps/system_size_1000.cfg b/sim/gobs/sweeps/system_1000.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_1000.cfg
rename to sim/gobs/sweeps/system_1000.cfg
diff --git a/sim/gobs/sweeps/system_size_100_1000.cfg b/sim/gobs/sweeps/system_100_1000.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_100_1000.cfg
rename to sim/gobs/sweeps/system_100_1000.cfg
diff --git a/sim/gobs/sweeps/system_size_120_640.cfg b/sim/gobs/sweeps/system_120_640.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_120_640.cfg
rename to sim/gobs/sweeps/system_120_640.cfg
diff --git a/sim/gobs/sweeps/system_size_20-1000.cfg b/sim/gobs/sweeps/system_20-1000.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_20-1000.cfg
rename to sim/gobs/sweeps/system_20-1000.cfg
diff --git a/sim/gobs/sweeps/system_size_20-40.cfg b/sim/gobs/sweeps/system_20-40.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_20-40.cfg
rename to sim/gobs/sweeps/system_20-40.cfg
diff --git a/sim/gobs/sweeps/system_size_240-640.cfg b/sim/gobs/sweeps/system_240-640.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_240-640.cfg
rename to sim/gobs/sweeps/system_240-640.cfg
diff --git a/sim/gobs/sweeps/system_size_pdsi_100-1000.cfg b/sim/gobs/sweeps/system_pdsi_100-1000.cfg
similarity index 100%
rename from sim/gobs/sweeps/system_size_pdsi_100-1000.cfg
rename to sim/gobs/sweeps/system_pdsi_100-1000.cfg
diff --git a/sim/gobs/sweeps/system_size_pdsi_20-40.cfg b/sim/gobs/sweeps/system_pdsi_20-40.cfg
similarity index 87%
rename from sim/gobs/sweeps/system_size_pdsi_20-40.cfg
rename to sim/gobs/sweeps/system_pdsi_20-40.cfg
index a3795b8..718a339 100644
--- a/sim/gobs/sweeps/system_size_pdsi_20-40.cfg
+++ b/sim/gobs/sweeps/system_pdsi_20-40.cfg
@@ -1,7 +1,6 @@
### System size: servers and files/objects
### 20-40 servers, selected exponentially with midpoints
-### TODO: 0 files * 10 objects * 3 replicas = 90,000 objects
# Number of servers:
nodes.min = 20
diff --git a/sim/gobs/sweeps/user01.cfg b/sim/gobs/sweeps/user00.cfg
similarity index 52%
copy from sim/gobs/sweeps/user01.cfg
copy to sim/gobs/sweeps/user00.cfg
index cce7fec..aa8468d 100644
--- a/sim/gobs/sweeps/user01.cfg
+++ b/sim/gobs/sweeps/user00.cfg
@@ -1,8 +1,8 @@
-# USER01
+# USER00
# use case
# User accesses:
-read.count = 12
-write.count = 30
+read.count = 0
+write.count = 0
read.mode = idle
hooks/post-receive
--
Grayskull Repository
1
0