Permalink
Browse files

Update the documents and remove the conficts on KVS and column support.

  • Loading branch information...
macan committed Oct 15, 2010
1 parent f6722ce commit 1f3474b900000c953670262f0fb22fd7c792efa6
Showing with 566 additions and 48 deletions.
  1. +146 −1 README
  2. +8 −7 api/api.c
  3. +236 −29 bin/hvfs.sh
  4. +27 −0 conf/ut.conf
  5. +51 −0 doc/howtomake.txt
  6. +29 −0 doc/todo.txt
  7. +50 −1 test/python/client.py
  8. +9 −4 test/xnet/client.c
  9. +7 −3 test/xnet/root.c
  10. +3 −3 xnet/xnet_simple.c
View
147 README
@@ -1,5 +1,5 @@
Writter: Ma Can <macan@ncic.ac.cn> or <ml.macana@gmail.com> (gmail is preferred)
-Time-stamp: <2010-10-09 10:54:29 macan>
+Time-stamp: <2010-10-15 11:24:51 macan>
Features of Pomegranate:
@@ -14,6 +14,17 @@ Features of Pomegranate:
make sure that there is no requests issued in changing. We plan to remove
this restriction in later version.
+Known Issues:
+
+1. R2 server is not stable on comparing saved site info with incoming site
+info.
+
+2. Memory management in MDS is not stable on requesting to create a lot of
+ files (say more than 2,000,000 on a 4GB memory machine).
+
+3. Bad memory usage in MDSL on manipulating many directories (say 20 on a 4GB
+ memory machine).
+
Getting Start with Pomegranate:
4. How to run the Key/Value interface?
@@ -418,6 +429,140 @@ Getting Start with Pomegranate:
Ho, it works? Any problem please contact me via mail at ml.macana AT gmail.com
+5. How to run the file system interface UNIT TEST?
+
+ Although our kernel/fuse file system client is not availble, you can run
+ our unit test on the internal interface. The UT client is at
+ 'test/xnet/client.ut'. Following the steps below to run the unit test.
+
+ 5.1 Using bin/hvfs.sh to start Servers
+
+ $ cd bin
+ $ MODE=fs ./hvfs.sh start
+ Start R2 server done. Waiting for 5 seconds to clean up latest instance...
+ Start MDSL server done.
+ Start MDS server done.
+ $ ./hvfs.sh stat
+ Checking servers' status ...
+ ----------MDSL----------
+ MDSL 0 is running.
+ MDSL 1 is running.
+ ----------MDS----------
+ MDS 0 is running.
+ MDS 1 is running.
+ MDS 2 is running.
+ MDS 3 is running.
+ ----------R2----------
+ R2 0 is running.
+ $ ./hvfs.sh ut
+ There are many unit test parameters, please see the config file in 'conf/ut.conf'.
+ Start 4 UT client(s) done.
+ $ top # you will see the UTs are running
+
+ You can see the log files in $LOG_DIR (defaults to ~) named
+ client.*.log for more information. For example:
+ $ tail ~/client.0.log
+ [INFO] ECHO Create Latency: 287.157100 us
+ [INFO] ECHO Create Latency: 290.737750 us
+ [INFO] ECHO Create Latency: 291.206600 us
+ [INFO] ECHO Create Latency: 292.183800 us
+ [INFO] ECHO Create Latency: 292.979700 us
+ [INFO] ECHO Create Aggr Lt: 58.598370 us
+ [INFO] ECHO Lookup Latency: 254.205600 us
+ [INFO] ECHO Lookup Latency: 256.316400 us
+ [INFO] ECHO Lookup Latency: 257.151800 us
+ [INFO] ECHO Lookup Latency: 258.977100 us
+ [INFO] ECHO Lookup Latency: 260.042600 us
+ [INFO] ECHO Lookup Aggr Lt: 52.009380 us
+ [INFO] ECHO WDATA Latency: 827.301850 us
+ [INFO] ECHO WDATA Latency: 833.583000 us
+ [INFO] ECHO WDATA Latency: 834.267550 us
+ [INFO] ECHO WDATA Latency: 845.088500 us
+ [INFO] ECHO WDATA Latency: 849.379500 us
+ [INFO] ECHO WDATA Aggr Lt: 169.876830 us
+ [INFO] ECHO RDATA Latency: 674.832350 us
+ [INFO] ECHO RDATA Latency: 679.080200 us
+ [INFO] ECHO RDATA Latency: 685.311900 us
+ [INFO] ECHO RDATA Latency: 687.121300 us
+ [INFO] ECHO RDATA Latency: 689.273700 us
+ [INFO] ECHO RDATA Aggr Lt: 137.854680 us
+ [INFO] ECHO Unlink Latency: 253.964900 us
+ [INFO] ECHO Unlink Latency: 254.777700 us
+ [INFO] ECHO Unlink Latency: 255.078950 us
+ [INFO] ECHO Unlink Latency: 255.470900 us
+ [INFO] ECHO Unlink Latency: 255.833850 us
+ [INFO] ECHO Unlink Aggr Lt: 51.167090 us
+ [INFO] Split_retry 167, FAILED:[create,lookup,unlink] 0 0 0
+
+ 5.2 Running UT manually
+
+ 5.2.1 Start the R2 server
+
+ It is the same as starting the R2 server in Section 4.1.
+
+ 5.2.2 Start the MDSL servers
+
+ It is the same as starting the MDSL servers in Section 4.2.
+
+ 5.2.3 Start the MDS servers
+
+ It is a little changing in start MDS servers. We default use
+ file system 0 for our file system interface unit test. Thus,
+
+ $ fsid=0 mode=1 hvfs_mds_opt_memlimit=0 hvfs_mds_memlimit=1072896010 hvfs_mds_txg_interval=5 hvfs_mds_opt_memonly=0 type=0 cache=0 test/xnet/mds.ut 0
+
+ You need to change the script 'start_mds.sh" either.
+
+ 5.2.4 Create the file system
+
+ You actually do NOT need to create file system 0. The R2 server
+ will create it on-the-fly if it has not existed.
+
+ 5.2.5 Running the UT program
+
+ We have provide a file system interface UT program at
+ 'test/xnet/client.ut'. Using the following cmd line to start it:
+
+ $ mode=1 op=200 thread=5 entry=100000 time test/xnet/client.ut 0
+
+ `mode=1' means that CLIENT will register itself with the R2 server.
+
+ `op=200' means that we want to do
+ 'create/lookup/wdata/rdata/unlink' sequentially.
+
+ `thread=5' means that we want to run with 5 concurrent threads.
+
+ `entry=100000' means that we want to manipulate on 100000 files.
+
+ Arguments:
+
+ 1. argv[1]: ID, logical number of this client;
+
+ 2. argv[2]: R2_IP, the ip address of the R2 server;
+
+ 3. argv[3]: PORT, the local listen port number of this server, it
+ should be consistent with the value in the config file;
+
+ op 0/1/2/3/4/5/100/200 =>
+ create/lookup/unlink/create_dir/write_data/read_data/[0,1,2]/[0,1,4,5,2]
+
+ 1. create: create a file's metadata without any data;
+
+ 2. lookup: lookup a file's metadata;
+
+ 3. unlink: delete a file;
+
+ 4. create_dir: create a [fake] directory;
+
+ 5. write_data: lookup a file's metadata and write data content to it;
+
+ 6. read_data: lookup a file's metadata and read the data content;
+
+ 7. [0,1,2]: do create, lookup, unlink sequentially;
+
+ 8. [0,1,4,5,2]: do create, lookup, write_data, read_data, unlink
+ sequentially;
+
Fast Error Code Reference:
1. Error Code defined by OS and Reused by Pomegranate
View
@@ -3,7 +3,7 @@
* <macan@ncic.ac.cn>
*
* Armed with EMACS.
- * Time-stamp: <2010-10-14 09:49:12 macan>
+ * Time-stamp: <2010-10-14 15:50:00 macan>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1295,18 +1295,18 @@ int hvfs_drop_table(char *name)
if (err) {
hvfs_err(xnet, "hvfs_find_table() failed w/ %d\n",
err);
- goto out;
+ goto out_exit;
}
err = __hvfs_list(uuid, LIST_OP_COUNT, &lr);
if (err) {
hvfs_err(xnet, "__hvfs_list() failed w/ %d\n", err);
- goto out;
+ goto out_exit;
}
if (lr.cnt) {
hvfs_err(xnet, "Table %s is not empty (%d entrie(s)), "
"reject drop\n", name, lr.cnt);
err = -EINVAL;
- goto out;
+ goto out_exit;
}
}
@@ -1481,6 +1481,7 @@ int hvfs_drop_table(char *name)
xnet_set_auto_free(msg->pair);
out:
xnet_free_msg(msg);
+out_exit:
return err;
out_free:
xfree(hi);
@@ -1495,8 +1496,8 @@ int __hvfs_read(struct amc_index *ai, char **value, struct column *c)
u32 vid = 0;
int err = 0;
- hvfs_warning(xnet, "Read column itbid %ld len %ld offset %ld\n",
- c->stored_itbid, c->len, c->offset);
+ hvfs_debug(xnet, "Read column itbid %ld len %ld offset %ld\n",
+ c->stored_itbid, c->len, c->offset);
si = xzalloc(sizeof(*si) + sizeof(struct column_req));
if (!si) {
@@ -2139,7 +2140,7 @@ int hvfs_sput(char *table, char *key, char *value, int column)
xnet_msg_add_sdata(msg, value, strlen(value));
}
- hvfs_info(xnet, "%ld, %ld\n", ai.tid, ai.dlen);
+ hvfs_debug(xnet, "key len %ld, key+value len %ld\n", ai.tid, ai.dlen);
resend:
err = xnet_send(hmo.xc, msg);
Oops, something went wrong.

0 comments on commit 1f3474b

Please sign in to comment.