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

Connection priority [CORE728] #1103

Open
firebird-automations opened this issue Sep 17, 2003 · 9 comments
Open

Connection priority [CORE728] #1103

firebird-automations opened this issue Sep 17, 2003 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pcisar

Votes: 3

SFID: 807961#⁠
Submitted By: pcisar

Allow for task priority to be set by connection.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10752 ] => Firebird [ 15150 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

The fast and easy way to implement this would be insert a Sleep() interval between rows while running a query (or update...).
* it could be called during DB connection:
IBDataBase1.Params.Text := 'user_name=SYSDBA'#⁠13'password=masterkey'#⁠13'lc_ctype=WIN1250'#⁠13'sleep_between_rows=10 '; //0..1000 ms

OR (and)
* implement into transaction params:
IBTransaction1.Params.Text := 'read_committed'#⁠13'rec_version'#⁠13'nowait'#⁠13'priority_lowest ';

Reason:
On many cases the 'server' is running on the same 'client' machine. One big query can "hold" the CPU on 100% for long seconds, even for minutes > making other operations impossible. :(
/OFF
It is a long long waited basic "feature". Saw many programmers to change to other RDBMS because of this problem. IMHO even a fast-dirty programming solution (like forcing sleep) is better than no solution.

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

/OFF Any Progress on this Issue ? PLEASE ! :(

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

/OFF still nothing ?

@firebird-automations
Copy link
Collaborator Author

Commented by: Desire Black (.des:.)

+1 for this. Setting priority per transaction should be essential!
Waiting for this since ages too.

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

I've just realized: since FB v3.0 there is not possible any more to configure "wait time" in the firebird.conf file :(
v2.1 and v2.5 had:
UsePriorityScheduler = 1
PrioritySwitchDelay = 1000 #⁠ wait 1 sec before ...
PriorityBoost = 10 #⁠ insert 10ms between every process > so the CPU has some time to "catch a breath" = run on 80% only

At FB v3.0 now there is only:
ProcessPriorityLevel = 0
Witch is not so good because you can not wait a predefined time until priority should lower itself automatically.

__________________________________________________

Also there is still no SLEEP(x milliseconds) function built in yet :(
- it should provide a simple solution by inserting directly into SELECT or procedures/triggers.
... like here http://stackoverflow.com/a/5328416
similar to a "home-made" UDF function like SP_SLEEP: https://gist.github.com/pilcrow/873189
__________________________________________________

So this feature became a MUST NEED one. (Or at least the SLEEP() function.)

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> Reason:
> On many cases the 'server' is running on the same 'client' machine. One big query can "hold" the CPU on 100% for long seconds, even for minutes > making other operations impossible. :(

Is it still actual (considering almost no single-cpu\core present this days) ?

> It is a long long waited basic "feature".
> Saw many programmers to change to other RDBMS because of this problem
Really ? Basic "feature" ? Could you point me at such feature in other DBMS ?

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

> "Is it still actual (considering almost no single-cpu\core present this days) ? "

YESSS !
1. Think about EEEPCs, Thin clients (touch-PCs), Tablets, etc.
2. Even a few seconds of delay on a quick-sale or restaurant environment can cause huge problems.
3. Usually the firebird.conf is configured to use ALL cores, if there are more than one >
but even if just 1 core from 2 would block everything 1 minute long for 100%, while win-defender is using 100% on the other core = catastrophe.
(I'm experiencing all these as real life, "everyday problems" on hundreds of machines. 20%-single core, 75%-dual core, 5% more.)

_________________________

It would be really really nice, if ALL 3 features would be possible:

1.) Put SLEEP(2) into long running selects or procedures

2.) handle priority on transactions OR on selects

3.) configure .conf files to handle it automatically, just like before at prev. versions.

@firebird-automations
Copy link
Collaborator Author

Commented by: PizzaProgram Ltd. (szakilaci)

Maybe possible to implement to Firebird 4.0+ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant