
High Grade Reseller Hosting Solutions
“For their high grade Reseller Hosting solutions, Cartika Hosting receives an Editors' Choice Award”
Network Information
| Network Configuration |
| Cluster MRTG Graphs |
| Cartika Network Status |
| Uptime Statistics |

| H Sphere CP Acceleration |
|
When your Control Panel is slow or you have high CPU/memory load, you can do a few steps to accelerate its performance.
H-Sphere Java-Related Issues 1. Tomcat Optimization Customize Tomcat environment variables. 2. NFU Cache Optimization NFU cache parameters have to be set depending on your server memory size and the number of accounts and domains in your system. If a lot of new accounts/domains are added to H-Sphere, we recommend to reconfigure NFU cache as follows: 1. Stop the Control Panel. 2. Set NFU parameters in hsphere.properties. Check hsphere.log for NFU messages: grep NFU /var/log/hsphere/hsphere.log You would receive the lines like these: 2003-02-26 08:08:29,190 [Thread-11] DEBUG psoft.hsphere.CP - Resource NFU cache:initial size:5000 size:142 max size:5000 rate:0.0 Here, you should pay attention to the "size" and "rate" parameters. If the "initial size" is close to the "max size" and rate is lower than 0.75, it is appropriate to increase the size of NFU cache. For this, you need to insert two parameters to hsphere.properties: NFU_CACHE_MULTIPLIER = 5 In this example, cache size would increase five times, and if necessary (e.g., for accounting) it could be increased ten times. 3. Start the Control Panel. H-Sphere System Database Optimization 1. Converting Bigint to Int4 Skip this procedure if you have have already performed it.. Postgres migration from int8 to int4 is very effective if you host more than 500 accounts. (By default, Postgres can't index fields of the int8 type.) You need to perform it once at any time. For this procedure, find the partition with sufficient amount of free space. 1. Stop the Control Panel (check hsphere.log that no crons are running) 2. Export schema: pg_dump -u -s -f db_old.db hsphere Note: dump file is created with 644 permissions by default; you need to set more secure 600 permissions to prevent the data from being read by other users. 3. Convert int8 to int4: vi db.db %s/bigint/int4/g 4. Then, still editing db.db in vi, change type back to int8 for the ip_num column in the l_server_ips table and its index. ip_num int4 NOT NULL - and change int4 to int8; b) find the index creation command: CREATE INDEX "l_server_ips_numkey" on "l_server_ips" using btree ( "ip_num" "int4_ops" ); - and change int4_ops to int8_ops. 5. Export Data: pg_dump -u -a -f data.db hsphere Note: dump file is created with the 644 permissions by default; you need to set more secure 600 permissions to prevent the data from being read by other users. 6. Recreate DB: dropdb -U wwwuser hsphere 7. Create Schema: psql -q -U wwwuser -f db.db hsphere 8. Import Data *: psql -q -U wwwuser -f data.db hsphere 9. Start the Control Panel. 2. Updating Moddb (for H-Sphere 2.3.x starting from 2.3 RC4) Moddb is one of the scripts included in the H-Sphere update. However, it is not automatically performed during the H-Sphere installation. You should launch it manually and only once. To do this: Note: Prior to running moddb, update your H-Sphere to the latest version. 1. Stop the Control Panel. 2. Make moddb: #sh ./U23.2P5 - choose the moddb option. This option will back up old H-Sphere database and modify H-Sphere DB scheme (increase some fields length, e.g: email, notes, suspend/resume reason etc). Note: You may be prompted for your H-Sphere DB password under Postgres versions starting from 7.2.x. Enter the password to complete the procedure. 3. Start the Control Panel. 3. Performing VACUUM VACUUM should be performed regularly (e.g., once a week). You may put the corresponding script into cron. Mind, however, that this procedure requires a lot of system resources and creates a high server load. We recommend you to back up the database before performing vacuumdb. Be careful: if the server gets down during this process, some data may be lost! To backup your system database, run the hs_bck script: /hsphere/shared/scripts/cron/hs_bck, or cd /hsphere/shared/backup Do the following procedure to apply VACUUM to your system: 4. Optimizing Postgres Configuring Postgres Parameters You can enhance CP productivity by optimizing some Postgres parameters in the postgresql.conf file. Default values of these parameters are intended for less powerful workstations, and therefore these values should be significantly increased for better performance on servers with multiple CPUs, large RAM, and with large and intensively used databases. Consider reconfiguration of the following parameters (please refer to PostgreSQL documentation for details):
WARNING: To reconfigure Postgres parameters:
Moving Transaction Logs to a Separate Hard Drive If the system database is large (more than 1G), we recommend allocating a separate hard drive for its transaction logs. It is especially helpful for the database migration or recovery. To move transaction logs to another hard drive:
5. Upgrading Postgres to the Latest Version See Upgrading System Database. Troubleshooting Sometimes while importing data you may get the message like this: psql:data.db:527111: ERROR: copy: line 422025, Bad float8 input format -- underflow psql:data.db:527111: PQendcopy: resetting connection This means that Postgres can't interpret data it has just exported. You need to open the data.db file: vi data.db and remove the line which number is calculated in the example above as N=527111+422025. This line would contain a float8 number like 1.2e-318. After removing that line, you need to recreate and reload the database. |