Skip to content

Commit

Permalink
Make webapp containers "smaller" from a memory footprint standpoint, …
Browse files Browse the repository at this point in the history
…log memory usage, bump desired count to 2
  • Loading branch information
jbraswell committed Mar 29, 2018
1 parent 86d70b0 commit e7391da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions terraform/ecs-service.tf
Expand Up @@ -110,7 +110,7 @@ resource "aws_ecs_task_definition" "webapp" {
[
{
"volumesFrom": [],
"memory": 993,
"memory": 768,
"extraHosts": null,
"dnsServers": null,
"disableNetworking": null,
Expand Down Expand Up @@ -178,7 +178,7 @@ resource "aws_ecs_task_definition" "webapp" {
"awslogs-stream-prefix": "webapp"
}
},
"cpu": 1024,
"cpu": 768,
"privileged": null,
"memoryReservation": null
}
Expand All @@ -193,7 +193,7 @@ resource "aws_ecs_task_definition" "daemon" {
[
{
"volumesFrom": [],
"memory": 993,
"memory": 768,
"extraHosts": null,
"dnsServers": null,
"disableNetworking": null,
Expand Down Expand Up @@ -247,7 +247,7 @@ resource "aws_ecs_task_definition" "daemon" {
"awslogs-stream-prefix": "daemon"
}
},
"cpu": 1024,
"cpu": 768,
"privileged": null,
"memoryReservation": null
}
Expand All @@ -258,7 +258,7 @@ EOF
resource "aws_ecs_service" "webapp" {
name = "webapp"
cluster = "${aws_ecs_cluster.main.id}"
desired_count = 1
desired_count = 2
iam_role = "${aws_iam_role.tomato_lb.name}"
task_definition = "${aws_ecs_task_definition.webapp.arn}"

Expand Down
5 changes: 3 additions & 2 deletions uwsgi.ini
@@ -1,7 +1,8 @@
[uwsgi]
master = 1
memory-report = true
module = tomato.wsgi
http = 0.0.0.0:8000
max-requests = 50
processes = 32
log-format = [pid: %(pid)|app: -|req: -/-] %(addr) (%(user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core)) uagent (%(uagent))
processes = 16
log-format = [pid: %(pid)|app: -|req: -/-] %(addr) (%(user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core)) uagent (%(uagent)) vszM %(vszM) rssM %(rssM)

0 comments on commit e7391da

Please sign in to comment.