?

Log in

No account? Create an account

Previous Entry | Next Entry

Deep hack mode

Had an idea at 4:30 (woke up to use the bathroom) about how to handle Filespace's load problems...been studying mod_perl filters ever since. Essentially I want to make requests sleep() every kilobyte for short periods, and if a given file goes over a certain threshold of kilobytes per (e.g.) minute, the sleep period gets longer. Exponentially longer. With the right numbers, I could avoid what happened recently. I could even make the kilobyte measure be per-user instead of per-file, or all sorts of other nifty things.

Gonna involve a lot of database requests, but that's unavoidable.

This...could be interesting.

Anyway, I'm in deep hack mode. Please, people, no chat invitations or IMs (except for Liz, who knows how delicate DHM can be anyway).

Comments

( Read 2 comments — Leave a comment )
mordath
May. 11th, 2004 12:04 pm (UTC)
Out of curiosity, why not just...turn of IM?
elyscape
May. 11th, 2004 02:27 pm (UTC)
Try this...
Make it per-user, and have both the amount of data sent, and the amount of time resting, be variable. That is to say, perhaps it'll send 20KB, then wait a couple milliseconds, then repeat... until it hits a specific threshhold, at which point maybe it'll send 15KB and wait double the time. Or 10KB and the same time. Or something like that.
Uhm.... yeah.
( Read 2 comments — Leave a comment )