Any way to lower Python memory footprint? -


i'm developing python 2.6 (tested both on 2.6.5 , 2.6.6) application going run daemon on vps. during tests, i've found out app it's consuming (during sleep time, no activities or allocations whatsoever) 37.53mb of memory. i've spent last few hours optimizing code reduce app memory footprint miserably failed xd

i'm using line of bash code memory used app:

ps u -p $(pidof python) | awk 'nr > 1 {nm += $5} end {print nm * 1024}'  *(yes, im sure have 1 python instance running ;))* 

so, sure not goin waste time, ran python interpreter session (no script, no args, no modules loaded) , same script use memory consumed ... know what?

it's same entire app!

so, there's way reduce python interpreter memory footprint? tried set gc threshold 3 first generation , call gc.collect() in safe places of app ... nothing changed :(

are sure not reading python virtual memory?

python here consumes 3.4mb of private memory.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -