Anime Characters Database

Welcome | Daily | Donate

Featured Character Featured Series

News

Memory and Priority Jul 20, 2011 | Rei
Still keeping an eye on the Stat Server's memory usage. Also noticed it was running at "nice 10" which has been fixed thanks to "renice 1 -p 60227".

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
33914 rei 1 54 10 9340K 2892K select 0 5:42 0.00% screen
60227 rei 1 45 1 10920K 7500K accept 3 5:30 0.00% ss


Memory usage didn't immediately go up after freeing 4500 records.

We're using GLib C's malloc() and free() memory management features. Every call to free places the reallocated block on a free list. So if I deleted everything, there's always a chance sbrk() could be called to reduce the heap size. But given the nature of this program... that seems unlikely. The newest records are at the end, and the ones freed with be scattered all over the place, most densely packed at the beginning. Of course, after a free, the memory will be reused before the next sbrk() is made ... anyways, so long as we never go near 100M, I think I'll feel confident there are no memory leaks. But if it goes above 30M or 50M without much change in records, I'll have to consider using a MemLeak detector.

Also this time Bing was doing a DoS. lol What's with them requesting 30 pages in 2 seconds? Could be a spoofed User Agent. Meh... no harm done.
Stats Server DoS Issues Jul 18, 2011 | Rei
As expected, my code wasn't perfect. We had a few DoS attacks ( defined as more than 20 page requests in 2 seconds from 1 individual ) which caused an unexplained termination of the stats server.

First time it happened, it took the whole site down with it. I recoded a few things so that if the stats server died, the site continues to run without it.

Simplified several parts of code, traced the program execution, and recreated the scenario. At first I didn't realize why it was exiting at a dprintf() point.

Uploaded patch ss-0.3 which ran until the next DoS attack. Crashed again, but this time the site stayed up.

Looked over the code again... and noticed dprintf() was being called twice, but was requested only once. Added a return value to the function that might call dprintf to report if it did so I don't call it the second time.

Hopefully this is the last time I have to deal with it....

Still worried about the simplified while loops tho. They have a possibility of going infinite. I'll know by tomorrow if the code is solid.
PM Notifications by email Jul 17, 2011 | Rei
Long overdue, but finally you will receive an email notification ( generally within 5 minutes ) when a new PM is sent to you.

Sponsored with ♥



Sponsored with Jewels


Bookmark Icon Bookmark this Page

Characters

Anime and Games

Need Help Identifying a Character?

Who's This Character Board

12:27 am
animeCats
Who is this ?
Yesterday 10:33 pm
Anonymous
Who is this ?
Yesterday 10:32 pm
Anonymous
Who is this ?

[ View MORE ]

URL
Comment
Name
NSFW (18+) ?

Post a link to an image you want the Anime Characters Database Community to Identify


New Posts New Comments
Share on Facebook Share on Twitter Share on Google+ Share on Reddit Share on Tumblr
日本語 한국어 简化字 Français Deutsch Español Afrikaans English
Klein Klein
Right, it doesn't hurt.
All images are copyright of their respective owners.
Rendered in 26.8 ms. R-17-W-1-M-2162.94 KB Modified: Wed, 25 Jul 2018 01:48:41 -0400
Copyright © 2007-2018 Goral Software | Privacy Policy | Discord | Site banner is from nagomiko | Contact Us | Site Map | アニキャラベー | Advertise

Dark Theme :