which is how we get mem_used 3,134.00%
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | memcache_admin.247306_2.patch | 491 bytes | baldwinlouie |
| #3 | memcache_admin.247306_1.patch | 540 bytes | baldwinlouie |
| #1 | memcache_admin.247306.patch | 425 bytes | baldwinlouie |
which is how we get mem_used 3,134.00%
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | memcache_admin.247306_2.patch | 491 bytes | baldwinlouie |
| #3 | memcache_admin.247306_1.patch | 540 bytes | baldwinlouie |
| #1 | memcache_admin.247306.patch | 425 bytes | baldwinlouie |
Comments
Comment #1
baldwinlouie commentedHere is a quick little patch which converts the limit_maxbytes to KB before doing the mem_used calculation.
Comment #2
robertdouglass commented@baldwinlouie: I think your math might be off: http://www.matisse.net/bitcalc/
Comment #3
baldwinlouie commented@robertDouglass: My bad. I should of double checked everything before.
Anyhow, here's a new patch. All I did was move the $mem_used calculation to the top, before the format_size() functions are called. Looks like all the values are stored as bytes first, so this should take care of any conversion issues.
Comment #4
robertdouglass commentedI'm not sure your patch is as intended. Could I ask for a re-roll? Pretty please? =)
Comment #5
baldwinlouie commentedI just rerolled it with a fresh copy from cvs. The results are the same. I'll attach the re-roll as well.
I'll post what I did to the code here:
Note, I declared the $mem_used variable before any of the format_size() functions are called. I was thinking by declaring it at the top, the units for bytes and limit_maxbytes will be the same. Thus the calculation should come out correct.
Let me know if I missed something somewhere :)
Comment #6
robertdouglass commentedI solved this differently. The 'limit_maxbytes' value is expressed in megabytes so I multiplied it by 1048576 to match the units with 'bytes' and then did the math.
Comment #7
robertdouglass commentedgah. Either I'm off in my math by an order of magnitude or there's some other problem. Need more eyeballs.
Comment #8
baldwinlouie commentedhmm...I think it is because after this:
$values['bytes'] can either be in KB, MB. so converting limit_maxbytes to bytes might throw off the math.
Comment #9
kamleshpatidar commentedis it working?
i get 0.00% mem_used. how can i increase it?
Kamlesh Patidar
Comment #10
jaydub commentedI believe this has been addressed in CVS:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/memcache/me...
If someone can verify then I think this can be closed out
Comment #11
catchClosing this out, 18 months since that commit.