All,

I've got an issue with lock contention using nsvs.

Our site has a huge hash table of categories that is loaded once when the
server starts, and is modified rarely. It is used frequently throughout the
site. Currently we're keeping it in an nsv.

The problem is, under heavy load, we get into serious lock contention
problems reading from it. 99.99% of the time we are just reading, so
ideally I'd like to use something akin to a read/write lock, however, the
overhead of an actual rwlock will probably only make matters worse.

The table is far too large (~50,000 entries)to just load up every time an
interp is initialized.

I contemplated using ns_share, but after reading the source, decided it
would be even worse. (Much worse).

Any ideas for me? Is there any way to create a shared read-only
datastructure that doesn't use thread interlocking? Do I need to code my
datastructure up in C?

Thanks,
Sean

Reply via email to