How to properly configure task queue to run 30 tasks per hour? - google-app-engine

I should run only 30 tasks per hour and maximum 2 tasks per minute. I am not sure how to configure these 2 conditions at the same time. Currently I have the following setup:
- name: task-queue
rate: 2/m # 2 tasks per minute
bucket_size: 1
max_concurrent_requests: 1
retry_parameters:
task_retry_limit: 0
min_backoff_seconds: 10
But I don't understand how to add first condition there.

Related

How to make gcp schedule execute tasks at a specific time every hour?

How to set schedule as "every 1 minutes from every hours from HH:10 to HH:15"?
I want the task to be executed at a specific time every hour, but gcp doesn't seem to support it.
In a nutshell,I want to execute the task 5 times per hour.
https://cloud.google.com/appengine/docs/standard/python/config/cronref
"every 1 minutes from every hours from HH:10 to HH:15" not working.
"5 times per hour" would essentially mean every 12 minutes. Try:
schedule: every 12 minutes
If you are using Cloud Scheduler, you can specify a cron:
*/12 * * * *
For running its every 11-15th every hour being 10-15 hours, try using the cron:
11-15 10-15 * * *

Adding wait time in jmeter after every n number of threads

I have a Load test with following details:
Number of threads: 100
Ramp up time: 1 second
Thread group
|---HTTP Request1
I want the following:
100 threads to run in 1 sec
15 second delay
Then 100 threads run again
15 secs delay
.
.
.
.
Any leads would be helpful.
Amend your test configuration as follows:
Loop Controller - set how many loops you want
HTTP Request
Test Action -> Action: Pause -> Duration: 15000
Synchronizing Timer -> Number of Simultaneous Users to Group by: 100

Giving schedule time less time 1 minutes in google app engine

I am doing cron job in my application and I would like to run those cron jobs in every 5 seconds. So I make it schedule time in cron.xml to 5 seconds and 0.1 minutes but those can't make in cron job and I got fail to parse error.
below is How I configure in cron.xml
<?xml version="1.0" encoding="UTF-8"?>
<cronentries>
<cron>
<url>/cron/threadchacker</url>
<target>beta</target>
<description>daily summary job</description>
<schedule>every 5 seconds</schedule>
</cron>
</cronentries>
Format for cron regular schedule is:
every N (hours|mins|minutes) ["from" (time) "to" (time)]
Where N is integer number. So 1 minute is minimum period.
What you can do is to have a cron job that every minute queue few delayed tasks (see countdownMillis in TaskOptions)
1 with 5 seconds delay
1 with 10 seconds delay
1 with 15 seconds delay
etc.

Are crons executed globally or per app instance (i.e. load dependent)?

If I define a cron in App Engine to execute "every 10 minutes" - does that mean:
(a):
"every 10 minutes per app instance (i.e. load dependent)"
(b):
"every 10 minutes globally across all instances of the application" (i.e. load independent)?
It is once globally every 10 minutes. Note that the interval refers to the time between jobs. So job 2 will start 10 minutes after job 1 finishes. This might be important if your job is long-running (e.g., if it takes 5 minutes to run, then it will actually start every 15 minutes if you specify "every 10 minutes").

Apache2: server-status reported value for "requests/sec" is wrong. What am I doing wrong?

I am running Apache2 on Linux (Ubuntu 9.10).
I am trying to monitor the load on my server using mod_status.
There are 2 things that puzzle me (see cut-and-paste below):
The CPU load is reported as a ridiculously small number,
whereas, "uptime" reports a number between 0.05 and 0.15 at the same time.
The "requests/sec" is also ridiculously low (0.06)
when I know there are at least 10 requests coming in per second right now.
(You can see there are close to a quarter million "accesses" - this sounds right.)
I am wondering whether this is a bug (if so, is there a fix/workaround),
or maybe a configuration error (but I can't imagine how).
Any insights would be appreciated.
-- David Jones
- - - - -
Current Time: Friday, 07-Jan-2011 13:48:09 PST
Restart Time: Thursday, 25-Nov-2010 14:50:59 PST
Parent Server Generation: 0
Server uptime: 42 days 22 hours 57 minutes 10 seconds
Total accesses: 238015 - Total Traffic: 91.5 MB
CPU Usage: u2.15 s1.54 cu0 cs0 - 9.94e-5% CPU load
.0641 requests/sec - 25 B/second - 402 B/request
11 requests currently being processed, 2 idle workers
- - - - -
After I restarted my Apache server, I realized what is going on. The "requests/sec" is calculated over the lifetime of the server. So if your Apache server has been running for 3 months, this tells you nothing at all about the current load on your server. Instead, reports the total number of requests, divided by the total number of seconds.
It would be nice if there was a way to see the current load on your server. Any ideas?
Anyway, ... answered my own question.
-- David Jones
Apache status value "Total Accesses" is total access count since server started, it's delta value of seconds just what we mean "Request per seconds".
There is the way:
1) Apache monitor script for zabbix
https://github.com/lorf/zapache/blob/master/zapache
2) Install & config zabbix agentd
UserParameter=apache.status[*],/bin/bash /path/apache_status.sh $1 $2
3) Zabbix - Create apache template - Create Monitor item
Key: apache.status[{$APACHE_STATUS_URL}, TotalAccesses]
Type: Numeric(float)
Update interval: 20
Store value: Delta (speed per second) --this is the key option
Zabbix will calculate the increment of the apache request, store delta value, that is "Request per seconds".

Resources