You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
Hello, I've doing some load testing to the last version of CTF (ed0a225) and saw that some queries and the DB in general could be optimised.
The session table has the column cookie with type text. This is inefficient because we have a fixed size value that could fit inside a VARCHAR(200) without any issue. Also, the text type doesn't save values to memory, which generates lot of unnecessary CPU usage.
I know that on a normal usage, all this information would be also saved to Memcached, but I don't see why we can't also optimise this.
This graph represents the CPU usage (With 100+ concurrent requests) after changing the type to varchar and adding an INDEX to cookie.
Also, I haven't seen any index besides the primary key ones or a UNIQUE key.
Would you be interested in a PR with improvements on the database schema?
The text was updated successfully, but these errors were encountered:
@juanrossi Thanks for the research! We would certainly appreciate any optimizations you could suggest for the database schema if possible. There are some other priorities right now so we haven't had a lot of time to look into these areas.
Hello, I've doing some load testing to the last version of CTF (ed0a225) and saw that some queries and the DB in general could be optimised.
The
session
table has the columncookie
with typetext
. This is inefficient because we have a fixed size value that could fit inside aVARCHAR(200)
without any issue. Also, the text type doesn't save values to memory, which generates lot of unnecessary CPU usage.I know that on a normal usage, all this information would be also saved to Memcached, but I don't see why we can't also optimise this.
This graph represents the CPU usage (With 100+ concurrent requests) after changing the type to
varchar
and adding an INDEX tocookie
.Also, I haven't seen any index besides the primary key ones or a UNIQUE key.
Would you be interested in a PR with improvements on the database schema?
The text was updated successfully, but these errors were encountered: