Bitcoin Forum
April 23, 2024, 07:28:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 »
  Print  
Author Topic: Smartcoin Linux mining administration. [MULTI-MACHINE SUPPORT NOW IN!]  (Read 104964 times)
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 06:17:40 PM
 #421

I'm still up in the air about the best lockfile method to use for now.  One reason is, that I am strongly reconsidering the move to sqlite3.  I'm starting to hit the point where speed limitations are going to become very apparent.  I'm afraid that once multi-machine support is in, someone with 4+ machines will choke things up at the sqlite bottleneck. So the lockfile may become irrelevant if the move back to MySQL happens
Why do you need to use an external locking mechanism at all? SQLite has built-in locking in the event that more than one thread has the SQLite databas open. The locking only comes into effect for writes of course. Multiple threads can read from the same database concurrently.



This isn't completely accurate for a couple of reasons, sqlite, and sqlite 3 aren't the same project exactly. Sqlite3 is a commandline utility that uses sqlite, and makes for an easy way to use sqlite from things such as bash scipts.  And while its true that sqlite3 does have some "locking" support, its not a true lock. It only means that the database is marked as locked while being modified - and as such any other queries will fail that try to execute at the same time so as to not break the database or fetch information that is the middle of an update.  You can test this yourself while smartcoin is running by:
Code:
sqlite3 ~/.smartcoin/smartcoin.db "SELECT * FROM device;"
continually by pressing the up arrow then enter repeatedly.  You will see it won't take long before you get the "Error: database is locked" error.

However, I'm going to try something new this week - reading the output of the query and resubmitting it if a failed error is returned (in a loop). This will likely work, but there will be no real queueing and so order of query execution in the case of simultaneous  access will not be able to be preserved, though it may not be that big of a deal (that is, until multi-machine support is in and someone is managing 20 machines at a time!)
In the end, after Beta, I will most definitely be switching back to mysql, as it solved all these problems, and has the performance necessary for good multimachine support in the future.


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 06:22:21 PM
 #422

Dishwara:

Perhaps your card is locked up (instability from overclocking, which is a very common thing, as aticonfig will continue to report high gpu usage on locked-up cards)

For comparison, you can run
Code:
aticonfig --odgt --adapter=all
aticonfig --odgc --adapter=all
as it is aticonfig that returns values displayed in smartcoin.

Do all the launch strings in the log look correct?
You can also do:
Code:
screen -r miner
and directly view the phoenix output of each miner. That will probably give the best clue as to any problems

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 06:26:25 PM
 #423

Update r394(experimental) is now available.
- Fixes issue where newly created profiles were being pushed to the top of the failover list

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
dishwara
Legendary
*
Offline Offline

Activity: 1855
Merit: 1016



View Profile
July 11, 2011, 06:42:24 PM
 #424

Dishwara:

Perhaps your card is locked up (instability from overclocking, which is a very common thing, as aticonfig will continue to report high gpu usage on locked-up cards)

For comparison, you can run
Code:
aticonfig --odgt --adapter=all
aticonfig --odgc --adapter=all
as it is aticonfig that returns values displayed in smartcoin.

Do all the launch strings in the log look correct?
You can also do:
Code:
screen -r miner
and directly view the phoenix output of each miner. That will probably give the best clue as to any problems
I thought you can do anything about it in smartcoin, like restarting smartcoin itself if card locks.
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 08:45:12 PM
 #425

Dishwara:
If a card locks, in my experience usually a full reboot is needed, not just a restart of smartcoin (the problem is overclocking to the point of instability, which smartcoin has no control of)

I think you will have the best luck by backing off 1-2 mhz on your overclocking and see if that solves the problem - most likely it will.


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
July 11, 2011, 09:09:34 PM
 #426

I tired to run smartcoin from start up & so far can't
I created new entry in start up applications, but don't know what i give in command line to start smartcoin in a terminal window.
I just gave /home/myusername/smartcoin/smartcoin.sh , but it didn't run.
Can you tell how to run smartcoin from start up automatically in a terminal window.
Thanks.

I think the problem may be that by default smartcoin joins you to the screen session after initialization.

Jon, is there (or could there be) a command link switch to have smartcoin initialize, but detach from the session?

That way I could run:  smartcoin -silent
And it would just return the prompt.  But, I could then run "smartcoin" again and get the display?

I think that may be the problem with it in a start up script.

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
jaebird
Member
**
Offline Offline

Activity: 79
Merit: 10


View Profile
July 11, 2011, 09:34:51 PM
 #427

EDIT: Modified smartcoin launch to use --silent option Smiley

@Rob P

I use LinuxCoin as the base OS. One of the things about init.d that has to be considered is that X has to be running before LinuxCoin can start the GPU miners. Because LinuxCoin uses LXDE, I solved this by adding the following line to the global desktop environment application autostart file: /etc/xdg/lxsession/LXDE/autostart

@/home/user/setup_stuff.sh

The setup_stuff.sh script is:

#!/bin/bash
sudo chmod 777 /var/run/screen
/home/user/overdrive.sh
smartcoin --silent

The overdrive.sh script is:

export DISPLAY=:0.0
aticonfig --od-enable
AMDOverdriveCtrl -b -i 0 overdrive_mining_0.ovdr
AMDOverdriveCtrl -b -i 3 overdrive_mining_1.ovdr
AMDOverdriveCtrl -b -i 6 overdrive_mining_2.ovdr
AMDOverdriveCtrl -b -i 9 overdrive_mining_3.ovdr

I use slightly different (*.ovdr) settings for each card since some cards run hotter or faster than others.

This works well in my setup.

Cheers,
jaebird
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 09:35:15 PM
 #428

Rob P.

appending an '&' to the end of the line launching smartcoin may be needed, as it will start it in the background and be non-blocking to a startup script (without needing a --silent feature). I'll test it out myself this week, and come up with a standard way people can get it to run on startup. [edit: went ahead and implemented the --silent feature anyways Smiley ]

Either way, for anyone relying on a root script running at bootup, to start smartcoin, you need to su to the correct user first, so the script knows where to find ~/.smartcoin for the database (unless you install it under root, where then there will be a /root/.smartcoin)


something like:
Code:
su yourname -c "smartcoin --silent"
(though I haven't tested it)

(--silent option now in latest version)

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 09:37:19 PM
 #429

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

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Fletch
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 09:46:59 PM
 #430

As far as getting Smartcoin to startup automatically after a reboot in Ubuntu, I figured it out. Create /etc/init/smartcoin.conf with the following contents:

Code:
description "Start SmartCoin"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 30
script
        sleep 30
        exec su -c '/usr/bin/smartcoin' miner
end script

"miner" is the user that runs smartcoin. Not sure if the "exec" is required or not, but this works for me. As I'm writing this, I see that a --silent option has been added. Not sure if that affects the above script in any way. It appears to work without it.

This isn't completely accurate for a couple of reasons, sqlite, and sqlite 3 aren't the same project exactly. Sqlite3 is a commandline utility that uses sqlite, and makes for an easy way to use sqlite from things such as bash scipts.  And while its true that sqlite3 does have some "locking" support, its not a true lock. It only means that the database is marked as locked while being modified - and as such any other queries will fail that try to execute at the same time so as to not break the database or fetch information that is the middle of an update.
But what is locking the database? Is SmartCoin frequently running INSERTs and UPDATEs? The database should only be locked if a thread is writing to the database. I am unable to force a "database is locked" error by querying the database while SmartCoin is mining away in the background.

However, I'm going to try something new this week - reading the output of the query and resubmitting it if a failed error is returned (in a loop). This will likely work, but there will be no real queueing and so order of query execution in the case of simultaneous  access will not be able to be preserved, though it may not be that big of a deal (that is, until multi-machine support is in and someone is managing 20 machines at a time!)
In the end, after Beta, I will most definitely be switching back to mysql, as it solved all these problems, and has the performance necessary for good multimachine support in the future.
Personally, I think Sqlite and SmartCoin are a perfect match. Having MySQL as a dependency makes SmartCoin a lot less interesting, at least to me.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
jaebird
Member
**
Offline Offline

Activity: 79
Merit: 10


View Profile
July 11, 2011, 09:48:37 PM
 #431

@jondecker76:

Sometimes the display screen shows weird output:

--------BTCGuild--------
GPU[2]:  self.commandQueue, sel[326.74 Mhash/sec] [0 Accepted] [0 Rejected] [RPC (+LP)]
GPU[3]: [326.55 Mhash/sec] [1 Accepted] [0 Rejected] [RPC (+LP)]

If I go to the miner screen is see something like this...

[11/07/2011 21:42:32] Server gave new work; passing to WorkQueue
[11/07/2011 21:42:45] Server gave new work; passing to WorkQueue
[326.84 Mhash/sec] [0 Accepted] [0 Rejected] [RPC (+LP)]kernels/phatk/__init__.py:405: DeprecationWarning: 'enqueue_write_buffer' has been deprecated in version 2011.1. Please use enqueue_copy() instead.
  self.commandQueue, sel[11/07/2011 21:42:50] Result 00000000a9f08d4a... accepted
[11/07/2011 21:43:00] Result 00000000ad6ef537... accepted

It looks like pyopencl is outputting a deprecation warning that is outputting to the console. Could you ignore this stuff?

Thanks,
jaebird
Fletch
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 09:56:20 PM
 #432

jaebird: The error seems to be coming from Phoenix (kernels/phatk/__ini__.py). Which version of pyopencl do you have?

Edit: You seem to be running pyopencl 2011.1 or later. Try downloading version 0.92 instead. That's the one I see most guides recommending.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
jaebird
Member
**
Offline Offline

Activity: 79
Merit: 10


View Profile
July 11, 2011, 10:04:07 PM
 #433

jaebird: The error seems to be coming from Phoenix (kernels/phatk/__ini__.py). Which version of pyopencl do you have?

Edit: You seem to be running pyopencl 2011.1 or later. Try downloading version 0.92 instead. That's the one I see most guides recommending.

I'm just running the one that drgr33n put in LinuxCoin by default, I haven't messed with it beyond that.
Fletch
Full Member
***
Offline Offline

Activity: 168
Merit: 100


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 10:13:56 PM
 #434

I'm just running the one that drgr33n put in LinuxCoin by default, I haven't messed with it beyond that.
Aha. In that case, I suggest you ask in the Phoenix topic - http://forum.bitcoin.org/index.php?topic=6458.0

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
July 11, 2011, 10:17:11 PM
 #435

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)



--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 11, 2011, 10:23:15 PM
 #436

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?)


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jaebird
Member
**
Offline Offline

Activity: 79
Merit: 10


View Profile
July 12, 2011, 12:13:59 AM
 #437

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


jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 12, 2011, 01:32:20 AM
 #438

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!



RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76 (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
July 12, 2011, 01:34:33 AM
 #439

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

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Alan Lupton
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
July 12, 2011, 03:00:42 AM
 #440

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.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!