Pages:
Author

Topic: Smartcoin Linux mining administration. [MULTI-MACHINE SUPPORT NOW IN!] - page 21. (Read 105029 times)

newbie
Activity: 42
Merit: 0
I only use 16x risers. And I modded them because of the power consumption from the mainboard main plug. Anyway, I think I'll reinstall ubuntu with all five cards onboard.
legendary
Activity: 1855
Merit: 1016
Can this problem solved?

Smartcoin believes the GPU is mining even though it submitted shares a long time ago & temperature is in 60C(idle or less) range than other cards.
The total hash rate displaying is 2580+, which i get usually.

Hey dishwara,

what distro are you using? And which mainboard? I recently sticked the 5th card into my system (ubuntu 11.04 headless on MSI 890FXA-GD70) and since then it's like using a 386 DX2  Sad

A really laggy, sometimes not even responding system.
I am using Ubuntu 11.04 classic(thats what i selected in auto login). MSI big bang marshal. some times some mother boards won't work with 1x extenders. For some slots, particularly 8x slot you may need 16x extender cable.
For my mother board, i can't use 1x extender on pcie_3 & pcie_7, both needs 16x extenders as the slot itself works in 8x mode when other slots filled with cards. Due to limitation of PSU, i am running 4* 6970 & 2 *5870 on this mother board.
newbie
Activity: 42
Merit: 0
Alan:

Perhaps your new 5th GPU is bad?  Have you seen if it runs isolated on its own?  I don't think its smartcoin related, as I've personally seen an 8 GPU system running smartcoin with no problem. Do you have enough system memory?  Did you double check the devices stored in the database?

I have 6 cards, and changed the riser cables back and forth and the order of the cards back and forth. All cards ran before perfectly in two separated systems.
full member
Activity: 238
Merit: 100
Taking off for the day - me and the wife are going to Cedar Point for the day! (The greatest amusement park in the world!  Haven't been there in a couple of years)
I'll be back tomorrow to answer any questions or problems that pop up today

full member
Activity: 238
Merit: 100
Kennel:

Yes, that is exactly what I do - the status script is "throttled" by doing one refresh every 5 seconds or so - so the 500+ queries per seconds isn't all the time - its a short burst of a hundred queries that lasts 0.2 second once every 5 seconds.. (The 500 queries per second is just an extrapolated value to show that if the loop ran without a delay, thats about what it would be). This is why in the past, I would get unexplainable bug reports, as its by pure timing/bad luck/coincidence that the database locked error would show up (you would have to perform an add/edit/delete or a schema update patch execute in this small .2 second window - though it seemed unlikely, it was happening quite a few times)

If I were using c++, I would store an internal representation of the database and work against that, but bash doesn't have the kind  of  data structures needed to do this, so all queries are "live". With time, I'm sure I can optimize it some more.  Though it may not seem like it, smartcoin is much more complex that it would initially appear! (When I first started the project, I had no idea that it would be as complex as it is - but thats a good thing Smiley )
full member
Activity: 168
Merit: 100
I'll have a steak sandwich and a... steak sandwich
Now this shows, that in 0.20 seconds, 110 database queries are executed.  Multiply by 5 to get queries per second.  550 queries per second is definitely not "low traffic" database stuff (expecially for a CLI utility!)
My god. That explains the unusually high load averages (~0.6) I'm seeing when running SmartCoin. What could possibly be going on that would require you to run 500+ queries against SQLite every second? I know very little about shell scripting, but isn't there any way to throttle the execution so that it doesn't run in "realtime"? Put a few "sleeps" here and there maybe?
full member
Activity: 238
Merit: 100
Update r407(experimental) available
- Does a more graceful job of handling failed SQL queries (failed queries haven't been an issue, this is added "just in case")

If I don't hear of any problems on this recent round of updates in the next day or so, I'll set the flag for the stable branch to be able to update Smiley
full member
Activity: 238
Merit: 100
Alan:

Perhaps your new 5th GPU is bad?  Have you seen if it runs isolated on its own?  I don't think its smartcoin related, as I've personally seen an 8 GPU system running smartcoin with no problem. Do you have enough system memory?  Did you double check the devices stored in the database?
full member
Activity: 238
Merit: 100
Quote
Can you please add support for CPU mining?

In theory, CPU mining should work.  Give this a try:
1) Configure Miners -> Add
then add an identical copy of the default phoenix miner, but with a reasonable aggression (5?)
2) Configure Devices -> Add
enter the details of your CPU (name it something like CPU[0]), and make sure the device number is correct.

I don't see why it wouldn't work.  I purposely try to detect only GPU's at install, as most people wont' want to run CPU mining.  I think it may even pound the CPU so much, that you may have problems even handling the incoming SSH connection (which Is why I suggested using a lower aggression in phonix) - but feel free to give it a try and let us know if it works!
full member
Activity: 238
Merit: 100
- procmail dependency eliminated!
- Errored sql queries will retry  until they succeed (without locking mechanism)
Shouldn't it retry the query only if it gets the "database is locked" error? I mean, if a more serious error occurred, it would just keep pounding the database in an endless loop, would it not?

I'm still curious what is causing the locking issues in the first place. It really shouldn't be an issue for low traffic database stuff such as this.

Newer committed code retries queries 25 times before considering them dead.  Detailed logging happens on failure showing the exact nature of the failure.

Regarding low traffic database stuff - I hardly consider this low traffic. And in fact, I just did a test to see just what the query rate is:

with these changes...
Code:
Index: sql_ops.sh
===================================================================
--- sql_ops.sh (revision 407)
+++ sql_ops.sh (working copy)
@@ -33,6 +33,7 @@
  echo "$res"
 
         fi
+ echo "$Q" >> ~/test.txt
 }
 
 
Index: smartcoin_status.sh
===================================================================
--- smartcoin_status.sh (revision 407)
+++ smartcoin_status.sh (working copy)
@@ -336,12 +336,19 @@
 echo "INITIALIZING SMARTCOIN....."
 
 clear
+echo "" > ~/test.txt
+
 while true; do
+ dte=`date "+%D %T"`
+ echo "$dte" >> ~/test.txt
  LoadProfileOnChange
  UI=$(ShowStatus)
  clear
  ShowHeader
  echo -ne $UI
+ dte=`date "+%D %T"`
+ echo "$dte" >> ~/test.txt
  sleep $statusRefresh
+ exit
 done


I ran smartcoin... Here is the resulting file: (test.txt)
Code:
07/12/11 06:32:13
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT fk_profile FROM current_profile WHERE fk_machine=1;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT fk_profile FROM current_profile WHERE fk_machine=1;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT pk_miner FROM miner WHERE fk_machine=1 AND default_miner=1;
SELECT pk_profile, name, down FROM profile WHERE fk_machine='1' ORDER BY failover_order, pk_profile;
SELECT fk_device, fk_miner, fk_worker from profile_map WHERE fk_profile='7' ORDER BY fk_worker ASC, fk_device ASC
SELECT COUNT(*) FROM worker;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT fk_profile FROM current_profile WHERE fk_machine=1;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT pk_miner FROM miner WHERE fk_machine=1 AND default_miner=1;
SELECT pk_profile, name, down FROM profile WHERE fk_machine='1' ORDER BY failover_order, pk_profile;
SELECT fk_device, fk_miner, fk_worker from profile_map WHERE fk_profile='7' ORDER BY fk_worker ASC, fk_device ASC
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT name,device from device WHERE pk_device=1;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='dev_branch';
SELECT name,device from device WHERE pk_device=1;
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT name,device from device WHERE pk_device=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT value FROM settings WHERE data='dev_branch';
SELECT name,device from device WHERE pk_device=2;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT name,device from device WHERE pk_device=2;
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM machine WHERE pk_machine=1
SELECT name,device from device WHERE pk_device=2;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT value FROM settings WHERE data='dev_branch';
SELECT value FROM settings WHERE data='AMD_SDK_location';
Select name,device,type from device WHERE fk_machine=1 AND disabled=0 ORDER BY device ASC
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT name,device from device WHERE pk_device=3;
SELECT value FROM settings WHERE data='AMD_SDK_location';
SELECT value FROM settings WHERE data='phoenix_location';
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT value FROM settings WHERE data='phoenix_location';
SELECT name,device from device WHERE pk_device=3;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name,device from device WHERE pk_device=3;
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT name, path,launch FROM miner WHERE pk_miner=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT fk_profile FROM current_profile WHERE fk_machine=1;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT fk_profile FROM current_profile WHERE fk_machine=1;
SELECT value FROM settings WHERE data='donation_start';
SELECT value FROM settings WHERE data='donation_time';
SELECT pk_miner FROM miner WHERE fk_machine=1 AND default_miner=1;
SELECT pk_profile, name, down FROM profile WHERE fk_machine='1' ORDER BY failover_order, pk_profile;
SELECT fk_device, fk_miner, fk_worker from profile_map WHERE fk_profile='7' ORDER BY fk_worker ASC, fk_device ASC
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=1;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=2;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=2;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=2;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=3;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=3;
SELECT user,pass,pool.server, pool.port, pool.name from worker LEFT JOIN pool ON worker.fk_pool = pool.pk_pool WHERE pk_worker=4;
SELECT name FROM device WHERE pk_device=3;
SELECT down,failover_count FROM profile WHERE pk_profile='7';
UPDATE profile SET failover_count='3' WHERE pk_profile='7';
07/12/11 06:32:33


Now this shows, that in 0.20 seconds, 110 database queries are executed.  Multiply by 5 to get queries per second.  550 queries per second is definitely not "low traffic" database stuff (expecially for a CLI utility!)

The locking problem happens because, as you have stated, select queries can happen concurrently, and in fact, if you look at the test.txt i just posted, most all of the queries in the status script are select queries.
The problem is that sqlite requires exclusivity when doing update/insert statements (such as when you add/edit/delete something from the control screen or the update patch system alters the schema).  When trying one of these insert/update statements and there is currently a select statement querying the database, the insert/update can't get exclusivity, and errors out.  And as you can see, with 500+ queries per second, if you try an insert/update statement, the chances of a select statement happening from other code is at that very moment is very high (though this has been purely timing based, as the status loop currently doesn't run full-out with a built-in delay)

In the end though, it seems like the newer approach is working like it should be, so all is good!
full member
Activity: 168
Merit: 100
I'll have a steak sandwich and a... steak sandwich
- procmail dependency eliminated!
- Errored sql queries will retry  until they succeed (without locking mechanism)
Shouldn't it retry the query only if it gets the "database is locked" error? I mean, if a more serious error occurred, it would just keep pounding the database in an endless loop, would it not?

I'm still curious what is causing the locking issues in the first place. It really shouldn't be an issue for low traffic database stuff such as this.
newbie
Activity: 56
Merit: 0
Can you please add support for CPU mining?
My CPU just idle, so why not to add some more Mhash?
with CPUminerd i can get 25Mhash/s now,
with sse3 in the new version it will be even more.

I can add CPU miner to miners, but cant add CPU device
i offers just opencl GPUs.

Now I just starting script outside Smartcoin,
of course if pool is broken, GPU happily redirecting
CPU working to no avail.

thanks

newbie
Activity: 42
Merit: 0
The problem is the whole system! I don't even reach the point when mining is possible. Again, as I said, like using a 386 CPU or a newer CPU with cache off.
full member
Activity: 167
Merit: 100
Can this problem solved?




Smartcoin believes the GPU is mining even though it submitted shares a long time ago & temperature is in 60C(idle or less) range than other cards.
The total hash rate displaying is 2580+, which i get usually.

Hey dishwara,

what distro are you using? And which mainboard? I recently sticked the 5th card into my system (ubuntu 11.04 headless on MSI 890FXA-GD70) and since then it's like using a 386 DX2  Sad

A really laggy, sometimes not even responding system.

lower aggression down , thats what i had to do when i finished my 5 card 5830 setup on same motherboard .    mine is set at 10 right now and its working well for me .   

Jen
newbie
Activity: 42
Merit: 0
Can this problem solved?


http://i51.tinypic.com/ajq7me.jpg

Smartcoin believes the GPU is mining even though it submitted shares a long time ago & temperature is in 60C(idle or less) range than other cards.
The total hash rate displaying is 2580+, which i get usually.

Hey dishwara,

what distro are you using? And which mainboard? I recently sticked the 5th card into my system (ubuntu 11.04 headless on MSI 890FXA-GD70) and since then it's like using a 386 DX2  Sad

A really laggy, sometimes not even responding system.
full member
Activity: 238
Merit: 100
Update r406(experimental) available!
- Finally!  Edit profiles is implemented! (individual instances can be added/edited/deleted in the profile that you are editing).

known issue with this release: While editing profiles, you can't change the profile's name yet, but everything else is there and working Smiley
full member
Activity: 238
Merit: 100
jaebird:
I will be working this week on detecting miners that haven't updated/locked up.  I'm hoping to have something finished and working this week. I will also be adding an adjustable setting for refresh delay (0=as fast as possible, but will default to 5 ) I definitely like your color coding idea, and will try to get that in as well!


member
Activity: 79
Merit: 10
Update r405(experimental) available!
- procmail dependency eliminated!
- Errored sql queries will retry  until they succeed (without locking mechanism)
- An attempt is made to supress error messages coming from the individual miner instances (jaebird - can you confirm if it works?)



To the error messages question... that would be an emphatic YES! Thanks Jon.

One other suggestion, could you red or orange color the miner status text in the case of GPU miner lockup (ie it hasn't updated within X secs)? It hasn't happened to me in awhile since downclocking, however, sometimes i just jump to the miner screen to see the quicker updates of each miner to make sure it is still running than wait for the next accepted "work".

Or you could use the old school twirling ascii throbber for each one as they update Smiley  
aka sequence: |  / - \  

Something to think about at least...  BTW, as an Android user I'm a CyanogenMod nightly junky... perhaps I'm now also a SmartCoin experimental junky too?

EDIT: oh and thanks for eliminating procmail dep as well.

Thanks,
jaebird


full member
Activity: 238
Merit: 100
Update r405(experimental) available!
- procmail dependency eliminated!
- Errored sql queries will retry  until they succeed (without locking mechanism)
- An attempt is made to supress error messages coming from the individual miner instances (jaebird - can you confirm if it works?)

member
Activity: 84
Merit: 10
Update r399(experimental) now available
- you can now start smartcoin with the --silent option to not have the screen session automatically connect.

Hey Jon.  Thanks!  You've got to be one of the most responsive developers I've had the pleasure of giving my ideas to.  :-D  2 for 2!

For folks wrestling with startup scripts, X windows, and smartcoin (with the new --silent option), I'd suggest (Under Ubuntu):

1)  Auto login to your local user (this will take care of X windows running as you)
2)  Open System -> Preferences -> Sessions
3)  Click the "Startup Programs" tab
4)  Click "Add"
5)  Enter "smartcoin --silent"

This should, if auto login is enabled, startup smartcoin in the background on your machine at boot.  If using the experimental branch (which you'd have to be in order to get "smartcoin --silent", you can put "init.sh" in your smartcoin installation directory to run your initialization commands (overclocking, setting fans, etc)


Pages:
Jump to: