Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some minor bugs. #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions DEDISbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ void process_run(int idproc, int nproc, double ratio, int iotype, struct user_co
//t1snap must take value of t2 because we want to get the time when requets are processed
stat.t1snap=t2;

if(res ==0 || res ==-1)
if(res ==0 || res ==-1) {
perror("Error writing block ");

if(strstr(strerror(errno), "No space left on device"))
exit(0);
}
if(stat.beginio==-1){
if(begin_time >= ru_begin){
stat.beginio=t1;
Expand Down Expand Up @@ -964,6 +966,24 @@ int main(int argc, char *argv[]){
load_duplicates(&info,conf.distfile);
}
else{
/*todo:there must exist a distinction between three situations:
* - the user specifies a valid distribution file;
* - the user specifies an invalid distribution file;
* - the user doesn't provide a distribution file.
* This if statement (below) is preventing DEDISbench from running
* when an invalid distribution file is provided. Other
* situations where DEDISbench should work fine may be halted
* too, yet none was found. If this else statement (above) only
* treats this situation, then it is redundant once the program
* shoudln't run with a given invalid distribution file.*/
FILE* fpp=NULL;
if ((fpp = fopen(conf.distfile, "r"))){
fclose(fpp);
}
else{
perror("Cant open file");
exit(0);
}
//get global information about duplicate and unique blocks
printf("loading duplicates distribution %s...\n",DFILE);
get_distribution_stats(&info,DFILE);
Expand Down
12 changes: 6 additions & 6 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ run read benchmark in nominal mode (300 reads/second) for 10 minutes

run write benchmark in peak mode for 5 minutes. Enable the population of process files before actually running the benchmark load and enable log output for results. Use files with 4GB for each process and 8 processes.

./DEDISbench -p -w -t5 -fconfig.ini
./DEDISbench -p -w -t5 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[execution]
filesize=4096
Expand All @@ -165,19 +165,19 @@ logging=1

run read benchmark in nominal mode (300 reads/second) for 8 minutes. Disable the pre-population of files. Carefull because files test(processid) must be present and have content or no content will be available for reading resulting in I/O errors.

./DEDISbench -n300 -r -t8 -fconfig.ini
./DEDISbench -n300 -r -t8 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[results]
tempfilespath=./tempfiles
```

run 8 minutes mixed benchmark with a nominal load (100reads/s and 50 writes/s) in a raw device with 4GB.

./DEDISbench -m -nr100 -nw50 -t8 -fconfig.ini
./DEDISbench -m -nr100 -nw50 -t8 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[execution]
rawdevice=path/to/rawdevice
Expand Down
12 changes: 6 additions & 6 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ run read benchmark in nominal mode (300 reads/second) for 10 minutes

run write benchmark in peak mode for 5 minutes. Enable the population of process files before actually running the benchmark load and enable log output for results. Use files with 4GB for each process and 8 processes.

./DEDISbench -p -w -t5 -fconfig.ini
./DEDISbench -p -w -t5 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[execution]
filesize=4096
Expand All @@ -168,19 +168,19 @@ logging=1

run read benchmark in nominal mode (300 reads/second) for 8 minutes. Disable the pre-population of files. Carefull because files test(processid) must be present and have content or no content will be available for reading resulting in I/O errors.

./DEDISbench -n300 -r -t8 -fconfig.ini
./DEDISbench -n300 -r -t8 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[results]
tempfilespath=./tempfiles
```

run 8 minutes mixed benchmark with a nominal load (100reads/s and 50 writes/s) in a raw device with 4GB.

./DEDISbench -m -nr100 -nw50 -t8 -fconfig.ini
./DEDISbench -m -nr100 -nw50 -t8 -fconf/defconf.ini

config.ini
conf/defconf.ini
```
[execution]
rawdevice=path/to/rawdevice
Expand Down