News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Valodim's Thread

Started by Titiln, December 09, 2008, 06:39:29 AM

Previous topic - Next topic

Valodim

it's one or two levels above the php happening :)

hjk

Spoiler (click to show)
Ask piiym to be the new host.
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Orochi Gill

Quote from: Shundhi on January 13, 2011, 01:28:48 AM
Ask piiym to be the new host.

Do you realize what kind of strain that would put on that network

hjk

#803
Quote from: Orochi Gill on January 13, 2011, 07:30:09 AM
Quote from: Shundhi on January 13, 2011, 01:28:48 AM
Ask piiym to be the new host.
:rofl:                          :rofl:
Fixed

;)


Spoiler (click to show)
It was more of a play on the relationships between both forum's admins.
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

GOH

When the forum gets a 500, Renegade Mugen does too.

Are you sure it isn't a hosting problem?

Orochi Gill

Why are you going to Renegade Mugen

GOH

Why is that question relevant? :V

Valodim

those pages are on the same server, running in the same daemon, so naturally, they'll be down at the same time.

Been up for a while now. Looking good, I guess?

Orochi Gill

I just came back from a 500 error.

Valodim

really? it cleverly hid from me, then. whenever I checked over the day, the page was blazing fast :sadgoi:

NGeo

just a suggestion , why not change to Invision ?  :sugoi: its safer then SMF

Orochi Gill

Because the entire forum would have to be restarted, and checking post histories on Invision is a huge chore.

Valodim


Orochi Gill

CSX was hit with the virus stuff when SMF as a whole got hacked. That's probably what he's basing it on.

NGeo

Quote from: Orochi Gill on January 14, 2011, 07:11:36 AM
CSX was hit with the virus stuff when SMF as a whole got hacked. That's probably what he's basing it on.
indeed , basically thats what i heard

Orochi Gill

While this is true, think about it.

- Guild would have to be restarted in the event that the threads can not be transferred.
- Most likely EVERY member would have to reregister.
- Even though Guild is a purchased domain (I believe), the URL would likely change, killing years of links.
- Checking post histories on Invision is a huge chore as it only shows like a week's worth's of posts (like the last 5 or so).

Aldo

just for the record: didn't get any server errors today everything seems to be working well over here  :)
Chilling

Valodim

#817
thanks for the heads up :)

geez it's amazing how wrong you guys are about the technical stuff o_O

\\ edit

more tweaking here and there.. I still have no idea what the exact cause of this is, but playing around with those settings has at least not made anything worse (yet) ;)

Valodim

#818
Because I'm bored, here's some educational stuff about how servers work.

Here's what I'm paying for:
- a domain
- a virtual server

The domain is basically just an entry in the database that is somewhere, so that when your browser asks your ISP "hey, what's the address of mugenguild.com domain?" it will reply "sure thing bro, it's 83.169.33.162".

The server is a virtual server. That means it's not really a computer that's standing around, it's only a virtual machine that is part of a host that does nothing but run those sub-machines and evenly distribute resources among them. So what does that mean? The great difference to a real machine is, that it's much cheaper. Buying really powerful hardware and having that hardware act like many servers is much cheaper for hosters, because space in server centers is limited.

Apart from that, the server got its own running kernel, its own ip (the one mentioned above), and is completely independent of anything the other servers on the same host do. I don't know how many others there are (wild guess: maybe 10), I don't know anything that's around it. For me, it's as if there was a server somewhere running just for me.

Now, what's running on the server? Many things. Here's a list of processes:

Spoiler (click to show)

[mugenguild.com] :: ~ » ps faux

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   8348   804 ?        Ss   Jan13   0:04 init [2]
daemon   13322  0.0  0.0   8088   520 ?        Ss   Jan13   0:00 /sbin/portmap
root     13395  0.0  0.0   5968   688 ?        Ss   Jan13   0:00 /sbin/syslogd
root     13408  0.0  0.0   3864   464 ?        Ss   Jan13   0:00 /sbin/klogd -x
111      13414  0.0  0.0  23256   596 ?        Ss   Jan13   0:00 /usr/bin/dbus-daemon --system
bind     13424  0.0  0.5 123620 10916 ?        Ssl  Jan13   0:00 /usr/sbin/named -u bind
root     13433  0.0  0.0  49164  1140 ?        Ss   Jan13   0:00 /usr/sbin/sshd
root     13330  0.5  0.1  72976  3500 ?        Ss   18:38   0:00  \_ sshd: valodim [priv]
valodim  13359  0.0  0.0  72976  1788 ?        S    18:38   0:00      \_ sshd: valodim@pts/0
valodim  13360  3.5  0.1  36568  3828 pts/0    Ss   18:38   0:00          \_ -zsh
valodim  13391  0.0  0.0  10424   900 pts/0    R+   18:38   0:00              \_ ps faux
root     13471  0.0  0.0   3944   644 ?        S    Jan13   0:00 /bin/sh /usr/bin/mysqld_safe
mysql    13643  0.8 21.4 732260 449532 ?       Sl   Jan13  34:25  \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --open-files-limit=1024 --pid-file=/var/run
root     13645  0.0  0.0   3844   620 ?        S    Jan13   0:00  \_ logger -t mysqld -p daemon.error
root     13846  0.0  2.5 117984 52868 ?        SNs  Jan13   0:04 /usr/sbin/spamd --create-prefs --max-children 3 --helper-home-dir -d --pidfile=/var/run/spamd.pid
root     13861  0.0  2.9 125892 61036 ?        SN   Jan13   0:23  \_ spamd child
root     30565  0.0  2.4 117984 51208 ?        SN   Jan14   0:00  \_ spamd child
nobody   13890  0.0  0.0  72920  1220 ?        Sl   Jan13   0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1
root     13921  0.0  0.0 129276  1032 ?        Ssl  Jan13   0:01 /usr/sbin/nscd
mysql    13948  0.0  0.0  98716  1596 ?        S    Jan13   0:00 /usr/bin/searchd
root     13959  0.0  0.0  15572   952 ?        Ss   Jan13   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root     13997  0.0  0.1  52988  2500 ?        Ss   Jan13   0:01 sendmail: MTA: accepting connections         
root     14093  0.0  0.0  12696   752 ?        Ss   Jan13   0:01 /usr/sbin/cron
root     14189  0.0  0.3  35424  8212 ?        Ss   Jan13   0:01 /usr/sbin/munin-node
www-data 29873  0.3  0.2  61228  4816 ?        S    18:31   0:01 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
www-data 29874  0.0  0.4 188276  9972 ?        Ss   18:31   0:00  \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29888  0.1  1.0 201684 22552 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29889  0.0  0.7 197580 15808 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29890  0.1  0.7 197064 15712 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29891  0.1  0.8 197028 17660 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29901  0.1  0.7 197308 15724 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29902  0.0  0.7 197080 15784 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29903  0.0  0.7 196560 15368 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29905  0.0  0.7 196824 15912 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29907  0.0  0.7 197080 16168 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29909  0.0  0.6 195188 14236 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29916  0.1  0.8 196820 18552 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29917  0.0  0.7 196560 15432 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29918  0.0  0.6 197068 14680 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29922  0.0  0.7 196284 15496 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29923  0.1  0.8 197032 17064 ?        S    18:31   0:00  |   \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29884  0.0  0.4 188276  9976 ?        Ss   18:31   0:00  \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29892  0.6  1.0 200152 22476 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29893  0.4  1.0 197588 21836 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29894  0.5  0.8 196588 18648 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29895  0.5  0.9 194988 18972 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29896  0.5  0.8 197832 18544 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29897  0.4  1.0 197884 21288 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29898  0.4  0.9 196772 20832 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29899  0.5  1.0 197064 21076 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29900  0.6  0.9 196040 19756 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29910  0.4  0.8 196812 17988 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29911  0.6  1.1 197312 23196 ?        S    18:31   0:03      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29912  0.4  1.0 197076 22928 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29913  0.6  1.0 198344 21184 ?        S    18:31   0:03      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 29914  0.5  0.9 196312 20884 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini
www-data 13392  0.0  0.0   3944   592 ?        S    18:38   0:00      |   \_ sh -c host -W 1 '66.249.72.174'
www-data 13393  0.0  0.1  81884  3692 ?        Sl   18:38   0:00      |       \_ host -W 1 66.249.72.174
www-data 29915  0.4  1.0 197080 22516 ?        S    18:31   0:02      \_ /usr/bin/php-cgi -c /etc/php5/cgi/php.ini


Each of these exists for one specific purpose. The most interesting part is the mysqld, lighttpd and php-cgi processes.

The mysqld is the database server. It stores and manages all the dynamic data that exists on this forum, members threads posts boards categories what you read or didn't read yet, everything. But only the dynamic data! The images and so on that you see is static data, that's not in the database those are just files on the file system. Note how the memory usage is WAY higher than any other process, factor 10 at least.

The lighttpd is the http daemon. The http protocol is basically the way your browser communicates with the server (that's why it's in front of the http:// in your address bar). A session like this is actually a quite accurate representation of how it works:
- your browser resolves the ip the domain points to
- your browser sends a packet to the ip, saying "hey dude at mugenguild.com, gimme the page /forumx/index.php"
- the lighttpd daemon looks what /forumx/index.php is. for images and the like, it will just send the file back to the browser.

Now, if the request wants a dynamic page (typically everything that ends with .php, but not necessarily), the lighttp server will forward that request to one of the running php-cgi processes. There are a ton of those to speed up the process - most calls are read-only, so it's easy to do it concurrently. The php-cgi process will execute the forum script, which collects all the data from the database (mysqld), possibly the specialized search daemon (searchd) if you're doing a search, caches a bunch of data that stays mostly the same on most calls like the user profiles (memcached process), and returns the html of the page you then see.

Stuff I've been tweaking on is mostly the caching options, how much buffers the mysqld daemon keeps and how many tables it keeps open at the same time (it's at ~500 now), how many php-cgi processes there are and how they are organized, and a bunch of other stuff.

Note: I did not touch the forum's own settings in months. The problems happen at a lower level than that. One of the ideas of a virtual server is that it's all managed by the customer. There is no technical support whatsoever for anything running on it, and if I complain "hey guys my forum doesn't work!" they would either laugh at me or offer support for $80 an hour. Probably both, in that order. :)

Cyanide

And we've just had another error 500 for the last hour or so.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.